|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.tensegrity.gui.swing.repository.RepositoryItemPanel
The RepositoryItemPanel is a container for SlideIcons, CompositeIcons and all icon types used to offer all sorts of formatting, components, layout elements in a application. Icons are layouted in a grid from topleft to bottomright, row-wise by using a vertical BoxLayout with panels for each row. We emulate a gridlayout here to avoid the component resizing of java.awt.GridLayout. This icon panel has two modes: fixed-columns mode: if columns is > 0 then n icons are in one row always. flexible-columns-mode: if columns is <= 0 then as many icons as possible are put in each row.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
| 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 |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
RepositoryItemPanel()
Constructs a label panel |
|
RepositoryItemPanel(int initialColumns)
Constructs a label panel with the specified number of initial columns |
|
RepositoryItemPanel(int horizontalgap,
int verticalgap)
Constructs a label panel with the specified number of initial columns |
|
RepositoryItemPanel(int initialColumns,
int horizontalgap,
int verticalgap,
int iconwidth,
int iconheight)
Use insets to specify the outer gaps. |
|
| Method Summary | |
void |
addIcon(Icon icon)
Adds an icon to this panel. |
void |
addItemListener(java.awt.event.ItemListener l)
|
void |
addJComponent(javax.swing.JComponent component)
Adds a JComponent to this panel. |
void |
addRepositoryItem(AbstractRepositoryItem repItem)
Adds an ActionRepositoryItem to this panel. |
void |
applyEvList()
Tells the component to apply its UIItemEvaluationList. |
java.awt.Color |
getGradientEndColor()
Returns the color for the end position of the gradient. |
float |
getGradientEndPosition()
Returns the horizontal end position of the gradient relative to the size of the panel |
java.awt.Color |
getGradientStartColor()
Returns the color for the start position of the gradient. |
float |
getGradientStartPosition()
Returns the horizontal start position of the gradient relative to the size of the panel |
java.awt.Dimension |
getMaximumSize()
|
java.awt.Dimension |
getPreferredSize()
|
java.lang.Object[] |
getSelectedObjects()
|
java.lang.Object |
getSelection()
Returns the selection. |
void |
installEvList()
Tells the component to setup its internal state. |
void |
paintComponent(java.awt.Graphics g)
|
protected void |
postItemEvent(java.lang.Object selection)
Method postItemEvent post a new ItemEvent to all registered listeners. |
void |
removeItemListener(java.awt.event.ItemListener l)
|
void |
setBounds(int l,
int r,
int width,
int height)
|
void |
setGradientEndColor(java.awt.Color gradientRightColor)
Sets the color for the end position of the gradient. |
void |
setGradientEndPosition(float gradientPosition)
Sets the horizontal end position of the gradient relative to the size of the panel |
void |
setGradientStartColor(java.awt.Color gradientLeftColor)
Sets the color for the start position of the gradient. |
void |
setGradientStartPosition(float gradientPosition)
Sets the horizontal start position of the gradient relative to the size of the panel |
void |
setGraphApplication(GraphApplication graphApp)
Deprecated. No GraphApplication required, UIManager is enough. Use setUIManager instead. |
void |
setHorizontalSpacing(int hSpacing)
Sets the horizontal spacing between the items |
void |
setItemHeight(int height)
Sets the height of the items in this panel. |
void |
setItemWidth(int width)
Sets the width of the items in this panel. |
void |
setJPopupMenuSource(JPopupMenuSourceWithUpdateUI popupmenusource)
Sets the JPopupMenuSourceWithUpdateUI
to use for
displaying popup menus.
|
void |
setSelection(java.lang.Object selection)
Sets the selection and fires an event. |
void |
setUIManager(UIManager uiManager)
Sets the UIManager to use. |
void |
setVerticalSpacing(int vSpacing)
Sets the vertical spacing between the items |
protected void |
showPopup(java.awt.event.MouseEvent e)
This method shows the pop-up menu. |
void |
updateUI()
Perform some custom ui updating. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, 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 |
public RepositoryItemPanel()
public RepositoryItemPanel(int initialColumns)
initialColumns - number of initialcolumns.
public RepositoryItemPanel(int horizontalgap,
int verticalgap)
horizontalgap - the horizontal gap between the icons.verticalgap - the vertical gap between the icons.
public RepositoryItemPanel(int initialColumns,
int horizontalgap,
int verticalgap,
int iconwidth,
int iconheight)
initialColumns - number of initialcolumns.horizontalgap - the horizontal gap between the icons.verticalgap - the vertical gap between the icons.iconwidth - the reference iconwidthiconheight - the reference iconheight| Method Detail |
public void setGraphApplication(GraphApplication graphApp)
GraphApplication).
graphApp - the GraphApplication reference to use.public void setUIManager(UIManager uiManager)
UIManager to use.
uiManager - the UIManager to use.protected void showPopup(java.awt.event.MouseEvent e)
e - given MouseEvent.public void setJPopupMenuSource(JPopupMenuSourceWithUpdateUI popupmenusource)
JPopupMenuSourceWithUpdateUI
to use for
displaying popup menus.
A popupmenusource is a source for a popupmenu and can be asked to recreate the popupmenu on demand. This is needed for ui-switches during runtime, since popupmenus do not get updated if an ui-switch occurs.
Setting a new popupmenusource will invoke the destroy()
method on a previously set popupmenusource.
popupmenusource - the popupmenu source for the graphpanel.public void updateUI()
public void paintComponent(java.awt.Graphics g)
public void setBounds(int l,
int r,
int width,
int height)
public java.awt.Dimension getMaximumSize()
public java.awt.Dimension getPreferredSize()
public void addIcon(Icon icon)
icon - the icon to add to this panel.public void addItemListener(java.awt.event.ItemListener l)
addItemListener in interface java.awt.ItemSelectableItemSelectable.addItemListener(ItemListener)public java.lang.Object[] getSelectedObjects()
getSelectedObjects in interface java.awt.ItemSelectableItemSelectable.getSelectedObjects()public void removeItemListener(java.awt.event.ItemListener l)
removeItemListener in interface java.awt.ItemSelectableItemSelectable.removeItemListener(ItemListener)public java.lang.Object getSelection()
public void setSelection(java.lang.Object selection)
selection - The selection to setprotected void postItemEvent(java.lang.Object selection)
selection - the selection to post in the event.public void addJComponent(javax.swing.JComponent component)
JComponent to this panel.
component - the Component to add.public void addRepositoryItem(AbstractRepositoryItem repItem)
ActionRepositoryItem to this panel.
repItem - the ActionRepositoryItem to add.public void installEvList()
Evaluable
installEvList in interface Evaluablepublic void applyEvList()
EvaluableUIItemEvaluationList.
applyEvList in interface Evaluablepublic java.awt.Color getGradientStartColor()
public void setGradientStartColor(java.awt.Color gradientLeftColor)
gradientLeftColor - the color to setpublic java.awt.Color getGradientEndColor()
public void setGradientEndColor(java.awt.Color gradientRightColor)
gradientRightColor - the color to setpublic float getGradientStartPosition()
public void setGradientStartPosition(float gradientPosition)
gradientPosition - the horizontal start positionpublic float getGradientEndPosition()
public void setGradientEndPosition(float gradientPosition)
gradientPosition - the horizontal end positionpublic void setHorizontalSpacing(int hSpacing)
hSpacing - the horizontal spacing between the itemspublic void setVerticalSpacing(int vSpacing)
vSpacing - the vertical spacing between the itemspublic void setItemWidth(int width)
width - the width of the items in this panel.public void setItemHeight(int height)
height - the height of the items in this panel.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||