|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--EDU.ksu.cis.viewer.TreeComponent
A component displaying a graphical representation of a tree.
TreeComponents can be constructed quickly from
TreeDrawing
s. The actual rendering is done by the
underlying
TreeDrawing. The preferred size is determined automatically, so
that calls to setPrefferedSize have no effect.
Because this
component should not have children, no children are rendered, even if
they are added. The colors of the drawing are determined by the
underlying TreeDrawing, so the foreground color is unused.
TreeDrawing
, Serialized FormInner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Field Summary | |
static Font |
DEFAULT_FONT
The default Font. |
Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
TreeComponent(TreeDrawing tree)
Constructs a new TreeComponent displaying the given TreeDrawing using the default font. |
|
TreeComponent(TreeDrawing tree,
Font fnt)
Constructs a new TreeComponent displaying the given TreeDrawing using the given Font. |
Method Summary | |
Dimension |
getPreferredSize()
Returns the preferred size of this component. |
protected void |
paintChildren(Graphics g)
As this component should have no children, this method does nothing. |
protected void |
paintComponent(Graphics g)
Paints this component on the given graphics context. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final Font DEFAULT_FONT
Constructor Detail |
public TreeComponent(TreeDrawing tree) throws NullPointerException
public TreeComponent(TreeDrawing tree, Font fnt) throws NullPointerException
Method Detail |
public Dimension getPreferredSize()
protected void paintComponent(Graphics g)
g
- The graphics context to use for painting.protected void paintChildren(Graphics g)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |