|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.CellRendererPane com.jidesoft.grid.CellRendererPaneEx com.jidesoft.grid.TreeExpandablePanel
public class TreeExpandablePanel
The component used by TreeTableCellRenderer which has a "+/-" button.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.CellRendererPane |
---|
CellRendererPane.AccessibleCellRendererPane |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected Icon |
_collapsedIcon
|
protected Color |
_disabledBackground
|
protected Color |
_disabledForeground
|
protected ExpandableCell |
_expandableCell
|
protected Icon |
_expandedIcon
|
protected boolean |
_hasFocus
|
protected int |
_indent
|
protected boolean |
_isSelected
|
protected Color |
_lineColor
|
protected boolean |
_lineTypeDashed
|
protected Node |
_node
|
protected boolean |
_paintLeafNodeLines
|
protected boolean |
_paintLines
|
protected boolean |
_respectRendererPreferredSize
|
protected boolean |
_showRootHandles
|
protected JTable |
_table
|
static int |
CELL_HEIGHT
|
static int |
LEFT_MARGIN
|
static int |
TEXT_ICON_GAP
|
Fields inherited from class com.jidesoft.grid.CellRendererPaneEx |
---|
_actualRenderer |
Fields inherited from class javax.swing.CellRendererPane |
---|
accessibleContext |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
TreeExpandablePanel(JTable table)
|
|
TreeExpandablePanel(JTable table,
Icon expandedIcon,
Icon collapsedIcon,
Color disabledBackground,
Color disabledForeground)
Deprecated. use TreeExpandablePanel(javax.swing.JTable) instead |
Method Summary | |
---|---|
int |
getColumnWidth()
|
Dimension |
getMinimumSize()
|
Dimension |
getPreferredSize()
|
String |
getToolTipText(MouseEvent e)
Delegates getTooltipText to actual renderer. |
protected void |
initComponents()
|
boolean |
isExpandIconVisible(JTable table)
|
boolean |
isHasFocus()
Checks if expandable panel has focus. |
boolean |
isSelected()
Checks if the expandable panel is selected. |
void |
paint(Graphics g)
Calls the UI delegate's paint method, if the UI delegate is non- null . |
protected void |
paintBackground(Graphics g)
Paints the background. |
protected void |
paintFocus(Graphics g)
Paints the focus border. |
void |
setColumnWidth(int columnWidth)
|
void |
setEnabled(boolean enabled)
|
void |
setExpandableCell(ExpandableCell expandableCell)
ExpandableCell is the data used by ExpandablePanel. |
void |
setFont(Font c)
|
void |
setHasFocus(boolean hasFocus)
Sets the expandable panel focus attribute. |
void |
setNode(Node node)
ExpandableCell is the data used by ExpandablePanel. |
void |
setSelected(boolean selected)
Sets the expandable panel selected/ |
Methods inherited from class com.jidesoft.grid.CellRendererPaneEx |
---|
getActualRenderer, getBorder, isPaintBackground, paintBorder, setActualRenderer, setPaintBackground |
Methods inherited from class javax.swing.CellRendererPane |
---|
addImpl, getAccessibleContext, invalidate, paintComponent, paintComponent, paintComponent, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int TEXT_ICON_GAP
public static final int LEFT_MARGIN
public static final int CELL_HEIGHT
protected ExpandableCell _expandableCell
protected Node _node
protected JTable _table
protected Icon _expandedIcon
protected Icon _collapsedIcon
protected Color _disabledForeground
protected Color _disabledBackground
protected boolean _paintLines
protected boolean _showRootHandles
protected boolean _respectRendererPreferredSize
protected boolean _paintLeafNodeLines
protected boolean _lineTypeDashed
protected Color _lineColor
protected int _indent
protected boolean _isSelected
protected boolean _hasFocus
Constructor Detail |
---|
public TreeExpandablePanel(JTable table)
@Deprecated public TreeExpandablePanel(JTable table, Icon expandedIcon, Icon collapsedIcon, Color disabledBackground, Color disabledForeground)
TreeExpandablePanel(javax.swing.JTable)
instead
table
- the tableexpandedIcon
- the expanded iconcollapsedIcon
- the collapsed icondisabledBackground
- the disabled backgrounddisabledForeground
- the disabled foregroundMethod Detail |
---|
protected void initComponents()
public void setEnabled(boolean enabled)
setEnabled
in class Component
public void setExpandableCell(ExpandableCell expandableCell)
expandableCell
- the expandable cellpublic void setNode(Node node)
node
- the nodepublic void paint(Graphics g)
null
. We pass the delegate a copy
of the Graphics
object to protect the rest of the paint code from irrevocable changes (for example,
Graphics.translate
).
If you override this in a subclass you should not make permanent changes to the passed in Graphics
.
For example, you should not alter the clip Rectangle
or modify the transform. If you need to do
these operations you may find it easier to create a new Graphics
from the passed in
Graphics
and manipulate it. Further, if you do not invoker super implementation you must honor the
opaque property, that is if this component is opaque, you must completely fill in the background in a non-opaque
color. If you do not honor the opaque property you will likely see visual artifacts.
paint
in class CellRendererPane
g
- the Graphics
object to protectpaint(java.awt.Graphics)
,
ComponentUI
protected void paintFocus(Graphics g)
g
- the Graphics instaceprotected void paintBackground(Graphics g)
g
- the Graphics instancepublic boolean isSelected()
public void setSelected(boolean selected)
selected
- the flag indicating if the expandable panel is selectedpublic boolean isHasFocus()
public void setHasFocus(boolean hasFocus)
hasFocus
- the flag indicating if the expandable panel has focuspublic Dimension getMinimumSize()
getMinimumSize
in class Container
public int getColumnWidth()
public void setColumnWidth(int columnWidth)
public Dimension getPreferredSize()
getPreferredSize
in class Container
public void setFont(Font c)
setFont
in class Container
public String getToolTipText(MouseEvent e)
getToolTipText
in class CellRendererPaneEx
e
- the mouse event
public boolean isExpandIconVisible(JTable table)
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |