org.tbee.swing
Class NeonBorder

java.lang.Object
  extended by org.tbee.swing.NeonBorder
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener, Border

public class NeonBorder
extends Object
implements Border, MouseListener, MouseMotionListener

Version:
$Revision: 1.14 $

Field Summary
static Color[] BLUE
           
static Color[] GREEN
           
static Color[] GREY
           
static Color[] ORANGE
           
static Color[] RED
           
static String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
 
Constructor Summary
NeonBorder()
          standaard
NeonBorder(Color highlight)
          custom color
NeonBorder(Color[] highlight)
          custom color
NeonBorder(Color[] normal, Color[] highlight)
          custom color
 
Method Summary
static JPanel createJPanelWithNeonBorder(Component component)
          Wrap a component in a JPanel with a standard neon border
static JPanel createJPanelWithNeonBorder(Component component, NeonBorder neonBorder)
          Wrap a component in a JPanel with a neon border
 Insets getBorderInsets(Component c)
           
 Color[] getHighlight()
           
 Color[] getNormal()
           
 boolean isBorderOpaque()
           
protected  boolean isMousOver(MouseEvent e)
          This method tries to determine if the mouse is actually over, taking the actual shape into account.
 void mouseClicked(MouseEvent e)
           
 void mouseDragged(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void setHighlight(Color color)
          derrives other colors
 void setHighlight(Color[] value)
           
 void setNormal(Color[] value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCECODE_VERSION

public static final String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values

GREY

public static Color[] GREY

GREEN

public static Color[] GREEN

BLUE

public static Color[] BLUE

RED

public static Color[] RED

ORANGE

public static Color[] ORANGE
Constructor Detail

NeonBorder

public NeonBorder()
standaard


NeonBorder

public NeonBorder(Color highlight)
custom color


NeonBorder

public NeonBorder(Color[] highlight)
custom color


NeonBorder

public NeonBorder(Color[] normal,
                  Color[] highlight)
custom color

Method Detail

getNormal

public Color[] getNormal()

setNormal

public void setNormal(Color[] value)

getHighlight

public Color[] getHighlight()

setHighlight

public void setHighlight(Color[] value)

setHighlight

public void setHighlight(Color color)
derrives other colors

Parameters:
color -

getBorderInsets

public Insets getBorderInsets(Component c)
Specified by:
getBorderInsets in interface Border

isBorderOpaque

public boolean isBorderOpaque()
Specified by:
isBorderOpaque in interface Border

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Specified by:
paintBorder in interface Border

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mouseMoved

public void mouseMoved(MouseEvent e)
Specified by:
mouseMoved in interface MouseMotionListener

mouseDragged

public void mouseDragged(MouseEvent e)
Specified by:
mouseDragged in interface MouseMotionListener

isMousOver

protected boolean isMousOver(MouseEvent e)
This method tries to determine if the mouse is actually over, taking the actual shape into account.

Parameters:
e -
Returns:

createJPanelWithNeonBorder

public static JPanel createJPanelWithNeonBorder(Component component)
Wrap a component in a JPanel with a standard neon border


createJPanelWithNeonBorder

public static JPanel createJPanelWithNeonBorder(Component component,
                                                NeonBorder neonBorder)
Wrap a component in a JPanel with a neon border



Copyright © 2012 KnowledgePlaza. All Rights Reserved.