|
||||||||||
| 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.JComponent
|
+--com.japisoft.multipanes.MultiPanes
This is the main container, it stores a set of
TitledPane. Each titledPane has a state
opened or closed and properties like name, icon... . The TitledPane set is stored in a titledPaneModel available
calling getModel. Each titledPane state is shown with the titledPaneView
available calling getView. Thus you can develop your own view calling setView
.
For freeing inner cross-references, it is recommended to call dispose after the multipanes usage
Basic usage sample :
JFrame f = new JFrame();
MultiPanes mp = new MultiPanes();
TitledPane pane1 = null;
mp.getModel().addTitledPane(
pane1 = new BasicTitledPane("test2", "Title 2", "ToolTip2", new JTable() ) );
f.getContentPane().add( mp );
mp.open( pane1 ); // We open it at starting
More information at http://www.japisoft.com
TitledPane,
Serialized Form| 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 | |
MultiPanes()
|
|
| Method Summary | |
void |
addNotify()
|
void |
addTitledPaneListener(TitledPaneListener listener)
Store a listener for notifying a titledPane opening/closing new status |
void |
close(TitledPane tp)
Closed the following titledPane, it can't be null |
java.awt.Color |
getDefaultSelectedTitledPaneBackground()
Reset the default background color for the selected titled pane |
java.awt.Color |
getDefaultSelectedTitledPaneForeground()
Reset the default background color for the selected titled pane |
java.awt.Color |
getDefaultTitledPaneBackground()
|
java.awt.Font |
getDefaultTitledPaneFont()
|
java.awt.Color |
getDefaultTitledPaneForeground()
|
TitledPaneModel |
getModel()
|
TitledPane |
getOpenedTitledPane()
|
int |
getVerticalInset()
|
TitledPaneView |
getView()
|
boolean |
isEnabledKeyAccelerator()
|
void |
open(TitledPane tp)
Opened the following titledPane, it can't be null |
protected void |
prepareTitledPaneKeyMapping()
This is called once to map a key for each titled pane with the following format "ctrl + shift + number" of the titled pane starting from 1. |
void |
removeTitledPaneListener(TitledPaneListener listener)
Remove a listener for notifying a titledPane opening/closing new status |
void |
requestFocus()
|
void |
setArrowMode(boolean arrowMode)
If true, it will update the view adding open/hide arrow.
|
void |
setDefaultSelectedTitledPaneBackground(java.awt.Color color)
Reset the default foreground color for the selected titled pane |
void |
setDefaultSelectedTitledPaneForeground(java.awt.Color color)
Reset the default foreground color for the selected titled pane |
void |
setDefaultTitledPaneBackground(java.awt.Color color)
Reset the default background color for the set of titled pane |
void |
setDefaultTitledPaneFont(java.awt.Font font)
Reset the default font for the set of titled pane |
void |
setDefaultTitledPaneForeground(java.awt.Color color)
Reset the default foreground color for the set of titled pane |
void |
setEnabledKeyAccelerator(boolean enabled)
Set a key for opening each titled pane from 1 to 9 with a mask ctrl + shit before. |
void |
setModel(TitledPaneModel model)
Set a new model for the set of titledPane |
void |
setVerticalInset(int verticalInset)
Set a separator between each titled pane. |
void |
setView(TitledPaneView view)
View for the opening/closing titledPane state |
void |
updateView()
This method rebuilds the user interface view, so it musn't be called a lot of time. |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, 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, updateUI |
| 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, 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 MultiPanes()
| Method Detail |
public void setModel(TitledPaneModel model)
public TitledPaneModel getModel()
public void setView(TitledPaneView view)
public TitledPaneView getView()
public void setArrowMode(boolean arrowMode)
true, it will update the view adding open/hide arrow.
Note that this method must be called BEFORE the Multipanes is visible
arrowMode - public void setVerticalInset(int verticalInset)
0
public int getVerticalInset()
public void open(TitledPane tp)
null
public void close(TitledPane tp)
null
public TitledPane getOpenedTitledPane()
nullpublic void updateView()
public void addNotify()
addNotify in class javax.swing.JComponentpublic void requestFocus()
requestFocus in class javax.swing.JComponentpublic void addTitledPaneListener(TitledPaneListener listener)
public void removeTitledPaneListener(TitledPaneListener listener)
public void setEnabledKeyAccelerator(boolean enabled)
true
enabled - Bind a key for opening a titled panepublic boolean isEnabledKeyAccelerator()
true if a key ctrl + shift + number is available for
opening a titled pane.protected void prepareTitledPaneKeyMapping()
public void setDefaultTitledPaneFont(java.awt.Font font)
public java.awt.Font getDefaultTitledPaneFont()
null by defaultpublic void setDefaultTitledPaneForeground(java.awt.Color color)
public java.awt.Color getDefaultTitledPaneForeground()
null by defaultpublic void setDefaultTitledPaneBackground(java.awt.Color color)
public java.awt.Color getDefaultTitledPaneBackground()
null by defaultpublic void setDefaultSelectedTitledPaneForeground(java.awt.Color color)
public java.awt.Color getDefaultSelectedTitledPaneForeground()
public void setDefaultSelectedTitledPaneBackground(java.awt.Color color)
public java.awt.Color getDefaultSelectedTitledPaneBackground()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||