de.uni_paderborn.fujaba.fsa.swing
Class DoubleLineUI

java.lang.Object
  extended byjavax.swing.plaf.ComponentUI
      extended byde.uni_paderborn.fujaba.fsa.swing.LineUI
          extended byde.uni_paderborn.fujaba.fsa.swing.DefaultLineUI
              extended byde.uni_paderborn.fujaba.fsa.swing.DoubleLineUI

public class DoubleLineUI
extends DefaultLineUI

This UI lets a JLine appear as two parrellel lines with a small distance between them. Use createUI() to get an instance of this class.

Version:
$Revision: 1.10 $
Author:
$Author: lowende $

Field Summary
private static double DISTANCE
          The distance between the two lines in pixels.
private static DoubleLineUI ui
          This class is a singleton.
 
Fields inherited from class de.uni_paderborn.fujaba.fsa.swing.LineUI
PLAIN_STROKE
 
Constructor Summary
protected DoubleLineUI()
          Constructor for class DoubleLineUI
 
Method Summary
 boolean contains(javax.swing.JComponent c, int x, int y)
          No comment provided by developer, please add a comment to improve documentation.
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
          Returns an instance of this class for the given JComponent.
 java.awt.Rectangle getPreferredLineBounds(JLine line)
          Returns the preferred bounds of the given JComponent, using the start and end points of the JComponent.
 void paintLine(java.awt.Graphics g, JLine line)
          Paints the two parrallel lines for the given JLine.
 
Methods inherited from class de.uni_paderborn.fujaba.fsa.swing.LineUI
getPreferredBounds, getPreferredSize, paint
 
Methods inherited from class javax.swing.plaf.ComponentUI
getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, installUI, uninstallUI, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ui

private static DoubleLineUI ui
This class is a singleton. This is the object of it.


DISTANCE

private static final double DISTANCE
The distance between the two lines in pixels. Obviously, the value will be rounded while drawing, however, the distance of sloped lines is affected by the value

See Also:
Constant Field Values
Constructor Detail

DoubleLineUI

protected DoubleLineUI()
Constructor for class DoubleLineUI

Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
Returns an instance of this class for the given JComponent.

Parameters:
c - the JComponent the LineUI should be returned for.
Returns:
An instance of this class.

contains

public boolean contains(javax.swing.JComponent c,
                        int x,
                        int y)
No comment provided by developer, please add a comment to improve documentation.

Overrides:
contains in class LineUI
Parameters:
c - No description provided
x - No description provided
y - No description provided
Returns:
No description provided

paintLine

public void paintLine(java.awt.Graphics g,
                      JLine line)
Paints the two parrallel lines for the given JLine.

Overrides:
paintLine in class DefaultLineUI
Parameters:
g - No description provided
line - No description provided

getPreferredLineBounds

public java.awt.Rectangle getPreferredLineBounds(JLine line)
Returns the preferred bounds of the given JComponent, using the start and end points of the JComponent.

Overrides:
getPreferredLineBounds in class DefaultLineUI
Parameters:
line - No description provided
Returns:
a rectangle with the preferred bounds of the given component.