git-svn-id: https://svn.coded.pt/svn/SIPRP@1466 bb69d46d-e84e-40c8-a05a-06db0d633741

lxbfYeaa
Diogo Neves 15 years ago
parent c3b0857c45
commit 939814ce89

@ -1,22 +0,0 @@
package leaf.ui;
import javax.swing.plaf.metal.MetalLookAndFeel;
public class LeafLookAndFeel extends MetalLookAndFeel
{
private static final long serialVersionUID = 1L;
@Override
public String getName()
{
return "LEAF";
}
@Override
public String getDescription()
{
return "Evolute's LEAF Look And Feel";
}
}

@ -1,15 +0,0 @@
package leaf.ui;
import javax.swing.JScrollPane;
public class LeafScrollBar extends JScrollPane
{
private static final long serialVersionUID = 1L;
public void paintComponent()
{
System.out.println("");
}
}

@ -1,70 +0,0 @@
package leaf.ui;
import java.beans.PropertyChangeListener;
import javax.swing.JTextArea;
import javax.swing.event.CaretEvent;
import javax.swing.event.CaretListener;
public class LeafTextArea extends JTextArea
{
private static final long serialVersionUID = 1L;
private static final String PROPERTY = "CHANGED";
private final ChangeThread thread = new ChangeThread();
private boolean isRunning = true;
public LeafTextArea( PropertyChangeListener parent )
{
this.addPropertyChangeListener( PROPERTY, parent );
this.addCaretListener( new CaretListener()
{
@Override
public void caretUpdate( CaretEvent e )
{
firePropertyChange( PROPERTY, false, true );
}
} );
}
@Override
public void setEditable( boolean b )
{
super.setEditable( b );
if( b )
{
startThread();
}
else
{
stopThread();
}
}
private void startThread()
{
isRunning = true;
thread.start();
}
private void stopThread()
{
isRunning = false;
}
private class ChangeThread extends Thread
{
@Override
public synchronized void start()
{
while( isRunning )
{
}
}
}
}

@ -1,47 +0,0 @@
package leaf.ui;
import java.awt.AWTException;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import javax.swing.JPanel;
public class LeafTransparentPanel extends JPanel
{
private static final long serialVersionUID = 1L;
private BufferedImage background = null;
public LeafTransparentPanel()
{
updateBackground();
}
private void updateBackground()
{
try
{
Robot rbt = new Robot();
Toolkit tk = Toolkit.getDefaultToolkit();
Dimension dim = tk.getScreenSize();
background = rbt.createScreenCapture( new Rectangle( 0, 0, (int) dim.getWidth(), (int) dim.getHeight() ) );
} catch( AWTException ex )
{
ex.printStackTrace();
}
}
@Override
public void paintComponent( Graphics g )
{
Point pos = this.getLocationOnScreen();
Point offset = new Point( -pos.x, -pos.y );
g.drawImage( background, offset.x, offset.y, null );
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 914 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 876 B

Loading…
Cancel
Save