|
||||||||||
| 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
|
+--com.zfqjava.swing.JSidePane
JSidePane provides a component to add group panel.
ValueAction, Serialized Form| Inner Class Summary | |
protected class |
JSidePane.AccessibleJSidePane
This class implements accessibility support for the JSidePane class. |
| Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| 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 | |
JSidePane()
Constructs a JSidePane. |
|
| Method Summary | |
void |
addGroup(java.awt.Component comp)
Adds the group component. |
void |
addGroup(java.awt.Component comp,
javax.swing.Action action)
Adds the group componet with the group header action. |
void |
addGroupAt(java.awt.Component comp,
javax.swing.Action action,
int index)
Adds the group component at the specify index with the group header action. |
void |
addListSelectionListener(javax.swing.event.ListSelectionListener listener)
Adds a listener to the list that's notified each time a change to the selection occurs. |
javax.swing.JButton |
createDefaultButton()
|
protected javax.swing.ListSelectionModel |
createSelectionModel()
Returns an instance of DefaultListSelectionModel. |
protected void |
fireSelectionValueChanged(int firstIndex,
int lastIndex,
boolean isAdjusting)
Notifies JList ListSelectionListeners that
the selection model has changed. |
javax.accessibility.AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JSidePane. |
javax.swing.Action |
getActionAt(int index)
Returns the action at the specify index. |
java.awt.Component |
getComponentAt(int index)
Returns the component at the specify index. |
int |
getGroupCount()
Returns the group count. |
javax.swing.event.ListSelectionListener[] |
getListSelectionListeners()
Returns an array of all the ListSelectionListeners added
to this JList with addListSelectionListener(). |
java.awt.Component |
getSelectedComponent()
Returns the currently selected component for this sidepane. |
int |
getSelectedIndex()
Returns the currently selected index for this sidepane. |
int |
getSelectionMode()
Returns whether single-item or multiple-item selections are allowed. |
javax.swing.ListSelectionModel |
getSelectionModel()
Returns the value of the current selection model. |
int |
indexOfAction(javax.swing.Action action)
Returns the action at the specify index. |
int |
indexOfComponent(java.awt.Component comp)
Returns the index for the specify component. |
protected void |
paintComponent(java.awt.Graphics g)
|
protected java.lang.String |
paramString()
Returns a string representation of this JSidePane. |
void |
removeAllGroup()
Removes all group component. |
void |
removeGroup(java.awt.Component comp)
Removes the group component. |
void |
removeGroupAt(int index)
Removes the group component at the specified index. |
void |
removeListSelectionListener(javax.swing.event.ListSelectionListener listener)
Removes a listener from the list that's notified each time a change to the selection occurs. |
void |
setActionAt(int index,
javax.swing.Action action)
Sets the action at the specify index. |
void |
setComponentAt(int index,
java.awt.Component comp)
Sets the group component at the specify index. |
void |
setLayout(java.awt.LayoutManager mgr)
|
void |
setSelectedComponent(java.awt.Component comp)
Sets the selected component for this sidepane. |
void |
setSelectedIndex(int index)
Sets the selected index for this sidepane. |
void |
setSelectionMode(int selectionMode)
Determines whether single-item or multiple-item selections are allowed. |
void |
setSelectionModel(javax.swing.ListSelectionModel selectionModel)
Sets the selectionModel for the list to a
non-null ListSelectionModel
implementation. |
void |
updateUI()
|
| 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, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| 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, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public JSidePane()
JSidePane.| Method Detail |
public void updateUI()
updateUI in class javax.swing.JComponentprotected javax.swing.ListSelectionModel createSelectionModel()
DefaultListSelectionModel. This
method is used by the constructor to initialize the
selectionModel property.ListSelectionModel used by this
JList.setSelectionModel(javax.swing.ListSelectionModel),
DefaultListSelectionModelpublic javax.swing.ListSelectionModel getSelectionModel()
ListSelectionModel that implements
list selectionssetSelectionModel(javax.swing.ListSelectionModel),
ListSelectionModel
protected void fireSelectionValueChanged(int firstIndex,
int lastIndex,
boolean isAdjusting)
JList ListSelectionListeners that
the selection model has changed. It's used to forward
ListSelectionEvents from the selectionModel
to the ListSelectionListeners added directly to the
JList.firstIndex - the first selected indexlastIndex - the last selected indexisAdjusting - true if multiple changes are being madeaddListSelectionListener(javax.swing.event.ListSelectionListener),
removeListSelectionListener(javax.swing.event.ListSelectionListener),
EventListenerListpublic void addListSelectionListener(javax.swing.event.ListSelectionListener listener)
JList
will have their ListSelectionEvent.getSource() ==
this JList
(instead of the ListSelectionModel).listener - the ListSelectionListener to addgetSelectionModel(),
getListSelectionListeners()public void removeListSelectionListener(javax.swing.event.ListSelectionListener listener)
listener - the ListSelectionListener to removeaddListSelectionListener(javax.swing.event.ListSelectionListener),
getSelectionModel()public javax.swing.event.ListSelectionListener[] getListSelectionListeners()
ListSelectionListeners added
to this JList with addListSelectionListener().ListSelectionListeners added or an empty
array if no listeners have been addedaddListSelectionListener(javax.swing.event.ListSelectionListener)public void setSelectionModel(javax.swing.ListSelectionModel selectionModel)
selectionModel for the list to a
non-null ListSelectionModel
implementation. The selection model handles the task of making single
selections, selections of contiguous ranges, and non-contiguous
selections.
This is a JavaBeans bound property.
selectionModel - the ListSelectionModel that
implements the selectionsjava.lang.IllegalArgumentException - if selectionModel
is nullgetSelectionModel()public void setSelectionMode(int selectionMode)
selectionMode values are allowed:
ListSelectionModel.SINGLE_SELECTION
Only one list index can be selected at a time. In this
mode the setSelectionInterval and
addSelectionInterval
methods are equivalent, and only the second index
argument is used.
ListSelectionModel.SINGLE_INTERVAL_SELECTION
One contiguous index interval can be selected at a time.
In this mode setSelectionInterval and
addSelectionInterval
are equivalent.
ListSelectionModel.MULTIPLE_INTERVAL_SELECTION
In this mode, there's no restriction on what can be selected.
This is the default.
selectionMode - an integer specifying the type of selections
that are permissiblegetSelectionMode()public int getSelectionMode()
selectionMode propertysetSelectionMode(int)public void setSelectedIndex(int index)
index - the index to be selectedjava.lang.IndexOutOfBoundsException - if index is out of range
(index < -1 || index >= component count)getSelectedIndex(),
SingleSelectionModel.setSelectedIndex(int)public int getSelectedIndex()
setSelectedIndex(int)public void setSelectedComponent(java.awt.Component comp)
selectedIndex to the index
corresponding to the specified component.java.lang.IllegalArgumentException - if component not found in componentbed
panegetSelectedComponent()public java.awt.Component getSelectedComponent()
null if there is no currently display card.setSelectedComponent(java.awt.Component)public final void setLayout(java.awt.LayoutManager mgr)
setLayout in class java.awt.Containerprotected void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic void addGroup(java.awt.Component comp)
comp - the component to add
public void addGroup(java.awt.Component comp,
javax.swing.Action action)
comp - the group componentaction - the group action
public void addGroupAt(java.awt.Component comp,
javax.swing.Action action,
int index)
comp - the component to addaction - the group actionindex - the component indexjava.lang.IndexOutOfBoundsException - public void removeGroupAt(int index)
index - the specified group indexpublic void removeGroup(java.awt.Component comp)
comp - the component to removepublic void removeAllGroup()
public int getGroupCount()
public void setComponentAt(int index,
java.awt.Component comp)
index - the specify indexcomponent - the componentpublic java.awt.Component getComponentAt(int index)
index - the specify indexpublic int indexOfComponent(java.awt.Component comp)
comp - the specify component
public void setActionAt(int index,
javax.swing.Action action)
action - the group header actionpublic javax.swing.Action getActionAt(int index)
index - the specify indexpublic int indexOfAction(javax.swing.Action action)
index - the specify indexpublic javax.swing.JButton createDefaultButton()
protected java.lang.String paramString()
null.paramString in class javax.swing.JComponentpublic javax.accessibility.AccessibleContext getAccessibleContext()
getAccessibleContext in interface javax.accessibility.AccessiblegetAccessibleContext in class javax.swing.JComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||