de.uni_paderborn.fujaba.fsa.swing
Class DefaultLineUI

java.lang.Object
  extended byjavax.swing.plaf.ComponentUI
      extended byde.uni_paderborn.fujaba.fsa.swing.LineUI
          extended byde.uni_paderborn.fujaba.fsa.swing.DefaultLineUI
Direct Known Subclasses:
DashedLineUI, DottedLineUI, DoubleLineUI

public class DefaultLineUI
extends LineUI

This is the UI used by JLines by default. It realizes a single straight line. Use createUI() to get an instance of this class.

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

Field Summary
 
Fields inherited from class de.uni_paderborn.fujaba.fsa.swing.LineUI
PLAIN_STROKE
 
Constructor Summary
protected DefaultLineUI()
          Protected default constructor.
 
Method Summary
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)
          Draws the line for the given JLine.
 
Methods inherited from class de.uni_paderborn.fujaba.fsa.swing.LineUI
contains, 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
 

Constructor Detail

DefaultLineUI

protected DefaultLineUI()
Protected default constructor. Should be only used by subclasses. If you want to obtain an instance of this class, use createUI()

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.

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.

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

paintLine

public void paintLine(java.awt.Graphics g,
                      JLine line)
Draws the line for the given JLine. For this class, a single straight line is drawn

Specified by:
paintLine in class LineUI
Parameters:
g - No description provided
line - No description provided