JIDE 3.5.15

com.jidesoft.grid
Class MarginExpandablePanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.CellRendererPane
              extended by com.jidesoft.grid.CellRendererPaneEx
                  extended by com.jidesoft.grid.TreeExpandablePanel
                      extended by com.jidesoft.grid.MarginExpandablePanel
All Implemented Interfaces:
RendererWrapper, ImageObserver, MenuContainer, Serializable, Accessible

public class MarginExpandablePanel
extends TreeExpandablePanel

The component used by PropertyTableCellRenderer and HierarchicalTableCellRenderer which has a "+/-" button.

See Also:
Serialized Form

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
 
Fields inherited from class com.jidesoft.grid.TreeExpandablePanel
_collapsedIcon, _disabledBackground, _disabledForeground, _expandableCell, _expandedIcon, _hasFocus, _indent, _isSelected, _lineColor, _lineTypeDashed, _node, _paintLeafNodeLines, _paintLines, _respectRendererPreferredSize, _showRootHandles, _table, CELL_HEIGHT, LEFT_MARGIN, 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
MarginExpandablePanel(JTable table)
           
MarginExpandablePanel(JTable table, Icon expandedIcon, Icon collapsedIcon, Color disabledBackground, Color disabledForeground)
          Deprecated. use MarginExpandablePanel(javax.swing.JTable) instead
 
Method Summary
protected  Icon getIcon(Node node)
          Gets the icon for the node.
 Color getMarginBackground()
          Gets the margin background color..
protected  void initComponents()
           
 boolean isPaintMarginBackground()
          Checks if the margin background should be painted.
 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.
 void setMarginBackground(Color marginBackground)
          Sets the margin background.
 void setPaintMarginBackground(boolean paintMarginBackground)
          Sets the attribute which controls if margin background should be painted.
protected  boolean shouldShowMargin(ExpandableCell property)
          Checks if the margin should be shown.
 
Methods inherited from class com.jidesoft.grid.TreeExpandablePanel
getColumnWidth, getMinimumSize, getPreferredSize, getToolTipText, isExpandIconVisible, isHasFocus, isSelected, paintFocus, setColumnWidth, setEnabled, setExpandableCell, setFont, setHasFocus, setNode, setSelected
 
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.awt.Container
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMousePosition, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MarginExpandablePanel

public MarginExpandablePanel(JTable table)

MarginExpandablePanel

@Deprecated
public MarginExpandablePanel(JTable table,
                                        Icon expandedIcon,
                                        Icon collapsedIcon,
                                        Color disabledBackground,
                                        Color disabledForeground)
Deprecated. use MarginExpandablePanel(javax.swing.JTable) instead

Creates an ExpandablePanel.

Parameters:
table - the table
expandedIcon - the expanded icon
collapsedIcon - the collapsed icon
disabledBackground - the disabled background
disabledForeground - the disabled foreground
Method Detail

initComponents

protected void initComponents()
Overrides:
initComponents in class TreeExpandablePanel

paint

public void paint(Graphics g)
Calls the UI delegate's paint method, if the UI delegate is non-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's 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.

Overrides:
paint in class TreeExpandablePanel
Parameters:
g - the Graphics object to protect
See Also:
paint(java.awt.Graphics), ComponentUI

getIcon

protected Icon getIcon(Node node)
Gets the icon for the node.

Parameters:
node - the node
Returns:
the icon for the node.
Since:
3.3.4

shouldShowMargin

protected boolean shouldShowMargin(ExpandableCell property)
Checks if the margin should be shown.

Parameters:
property - the property
Returns:
true if the margin

paintBackground

protected void paintBackground(Graphics g)
Description copied from class: TreeExpandablePanel
Paints the background.

Overrides:
paintBackground in class TreeExpandablePanel
Parameters:
g - the Graphics instance

getMarginBackground

public Color getMarginBackground()
Gets the margin background color..

Returns:
the margin background color.

setMarginBackground

public void setMarginBackground(Color marginBackground)
Sets the margin background.

Parameters:
marginBackground - the margin background

isPaintMarginBackground

public boolean isPaintMarginBackground()
Checks if the margin background should be painted.

Returns:
true if the margin background should be painted.

setPaintMarginBackground

public void setPaintMarginBackground(boolean paintMarginBackground)
Sets the attribute which controls if margin background should be painted.

Parameters:
paintMarginBackground - the attribute

JIDE 3.5.15