|
||||||||||
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.alee.laf.panel.WebPanel
com.alee.extended.tab.WebDocumentPane<T>
T
- document typepublic class WebDocumentPane<T extends DocumentData>
This component is basically a special container for customizable documents described by DocumentData class. You can also override DocumentData class and for example include your own data into the document itself.
This component uses either single or multiply tabbed panes and allow tabs reorder, drag, split and closability. All those features are of course configurable within the WebDocumentPane instance.
PaneData
,
SplitData
,
DocumentData
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected PaneData<T> |
activePane
Last active pane. |
protected boolean |
closeable
Whether documents can be closed or not. |
static javax.swing.ImageIcon |
closeTabIcon
Used icons. |
static javax.swing.ImageIcon |
closeTabRolloverIcon
|
protected static java.lang.String |
DATA_KEY
Constant key used to put pane element data into the UI component. |
protected java.util.List<DocumentListener<T>> |
documentListeners
Document event listeners. |
protected java.util.List<DocumentPaneListener<T>> |
documentPaneListeners
Document pane event listeners. |
protected DocumentDataProvider<T> |
documentsProvider
Documents data provider. |
protected boolean |
dragBetweenPanesEnabled
Whether documents drag between tabbed panes is enabled or not. |
protected boolean |
dragEnabled
Whether documents drag enabled or not. |
protected java.lang.String |
id
Unique document pane ID. |
protected java.lang.ref.WeakReference<T> |
previouslySelected
Previously selected document. |
protected StructureData |
root
Root structure element. |
protected boolean |
splitEnabled
Whether split creation is enabled or not. |
protected Customizer<WebSplitPane> |
splitPaneCustomizer
Document customizer. |
protected Customizer<WebTabbedPane> |
tabbedPaneCustomizer
Tabbed panes customizer. |
protected boolean |
tabMenuEnabled
Whether tab menu is enabled or not. |
protected TabTitleComponentProvider<T> |
tabTitleComponentProvider
Document tab title view customizer. |
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 javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
WebDocumentPane()
Constructs new document pane. |
|
WebDocumentPane(Customizer<WebSplitPane> splitPaneCustomizer,
Customizer<WebTabbedPane> tabbedPaneCustomizer)
Constructs new document pane. |
|
WebDocumentPane(Customizer<WebSplitPane> splitPaneCustomizer,
Customizer<WebTabbedPane> tabbedPaneCustomizer,
TabTitleComponentProvider<T> tabTitleComponentProvider)
Constructs new document pane. |
|
WebDocumentPane(Customizer<WebTabbedPane> tabbedPaneCustomizer)
Constructs new document pane. |
|
WebDocumentPane(Customizer<WebTabbedPane> tabbedPaneCustomizer,
TabTitleComponentProvider<T> tabTitleComponentProvider)
Constructs new document pane. |
|
WebDocumentPane(TabTitleComponentProvider<T> tabTitleComponentProvider)
Constructs new document pane. |
Method Summary | ||
---|---|---|
protected void |
activate(PaneData<T> paneData)
Sets active pane. |
|
protected void |
activate(T document)
Sets active pane. |
|
void |
addDocumentListener(DocumentListener<T> listener)
Adds document listener. |
|
void |
addDocumentPaneListener(DocumentPaneListener<T> listener)
Adds document pane listener. |
|
protected void |
checkSelection()
Checks selection state and fires selection event if required. |
|
void |
closeAll()
Closes all documents. |
|
void |
closeDocument(int index)
Closes document at the specified index in the active pane. |
|
void |
closeDocument(java.lang.String id)
Closes document with the specified ID. |
|
void |
closeDocument(T document)
Closes the specified document. |
|
protected void |
collectPanes(StructureData structureData,
java.util.List<PaneData<T>> panes)
Collects all PaneData available under the specified stucture element into list. |
|
protected void |
collectSplitPanes(StructureData structureData,
java.util.List<SplitData<T>> splits)
Collects all SplitData available under the specified stucture element into list. |
|
protected TabTitleComponentProvider<T> |
createDefaultTabTitleComponentProvider()
Returns default tab title component provider. |
|
void |
fireDividerLocationChanged(SplitData<T> splitData)
Fires SplitData divider location change event. |
|
void |
fireDocumentClosed(T document,
PaneData<T> pane,
int index)
Fires document closed event. |
|
boolean |
fireDocumentClosing(T document,
PaneData<T> pane,
int index)
Fires document closing event. |
|
void |
fireDocumentOpened(T document,
PaneData<T> pane,
int index)
Fires document opened event. |
|
void |
fireDocumentSelected(T document,
PaneData<T> pane,
int index)
Fires document selected event. |
|
void |
fireMerged(SplitData<T> mergedSplit,
StructureData<T> newStructureData)
Fires SplitData merge event. |
|
void |
fireOrientationChanged(SplitData<T> splitData)
Fires SplitData orientation change event. |
|
void |
fireSidesSwapped(SplitData<T> splitData)
Fires SplitData sides swap event. |
|
void |
fireSplitted(PaneData<T> splittedPane,
SplitData<T> newSplitData)
Fires PaneData split event. |
|
PaneData<T> |
getActivePane()
Returns currently active pane data. |
|
java.util.List<PaneData<T>> |
getAllPanes()
Returns list of all available panes within this document pane. |
|
java.util.List<SplitData<T>> |
getAllSplitPanes()
Returns list of all available split panes within this document pane. |
|
static
|
getData(WebSplitPane splitPane)
Returns split data stored inside the split pane component. |
|
static
|
getData(WebTabbedPane tabbedPane)
Returns pane data stored inside the tabbed pane component. |
|
T |
getDocument(int index)
Returns document at the specified tab index of the active pane. |
|
T |
getDocument(java.lang.String id)
Returns document with the specified ID or null if it is not inside this document pane. |
|
DocumentPaneState |
getDocumentPaneState()
Returns current document pane state. |
|
protected DocumentPaneState |
getDocumentPaneStateImpl(StructureData structure)
Returns document pane state starting from the specified structure. |
|
java.util.List<T> |
getDocuments()
Returns all documents opened in this document pane. |
|
int |
getDocumentsCount()
Returns amount of documents opened in this document pane. |
|
DocumentDataProvider<T> |
getDocumentsProvider()
Returns custom documents provider. |
|
java.lang.String |
getId()
Returns unique document pane ID. |
|
PaneData<T> |
getPane(java.lang.String documentId)
Returns pane that contains document with the specified ID. |
|
PaneData<T> |
getPane(T document)
Returns pane that contains specified document. |
|
T |
getSelectedDocument()
Returns selected document data. |
|
Customizer<WebSplitPane> |
getSplitPaneCustomizer()
Returns split pane customizer. |
|
StructureData |
getStructureRoot()
Returns current root element data. |
|
Customizer<WebTabbedPane> |
getTabbedPaneCustomizer()
Returns tabbed pane customizer. |
|
TabTitleComponentProvider<T> |
getTabTitleComponentProvider()
Returns document tab title view customizer. |
|
protected void |
init()
Initializes root and active pane. |
|
boolean |
isCloseable()
Returns whether tabs in this document pane are globally closable or not. |
|
boolean |
isDocumentOpened(java.lang.String documentId)
Returns whether document with the specified ID is opened inside this document pane or not. |
|
boolean |
isDocumentOpened(T document)
Returns whether specified document is opened inside this document pane or not. |
|
boolean |
isDragBetweenPanesEnabled()
Returns whether tabs drag between different tabbed panes is enabled or not. |
|
boolean |
isDragEnabled()
Returns whether tabs drag is enabled or not. |
|
static boolean |
isEmptyPane(StructureData data)
Returns whether the specified element is an empty pane or not. |
|
boolean |
isSplitEnabled()
Returns whether split creation is enabled or not. |
|
boolean |
isTabMenuEnabled()
Returns whether tab menu is enabled or not. |
|
void |
loadSettings()
Loads saved settings into the component if it is registered. |
|
void |
merge(StructureData toMerge)
Merges specified structure element and its sub-elements if it is possible. |
|
protected void |
mergeImpl(SplitData<T> splitData)
Merges specified split element and its sub-elements if it is possible. |
|
DocumentAdapter<T> |
onDocumentClose(DocumentDataRunnable<T> runnable)
Shortcut method for document close event. |
|
DocumentAdapter<T> |
onDocumentClosing(DocumentDataCancellableRunnable<T> runnable)
Shortcut method for document closing event. |
|
DocumentAdapter<T> |
onDocumentOpen(DocumentDataRunnable<T> runnable)
Shortcut method for document open event. |
|
DocumentAdapter<T> |
onDocumentSelection(DocumentDataRunnable<T> runnable)
Shortcut method for document selection event. |
|
void |
openDocument(java.lang.String documentId)
Opens document with the specified ID in this document pane. |
|
void |
openDocument(T document)
Opens document in this document pane. |
|
void |
registerSettings(SettingsProcessor settingsProcessor)
Registers component for settings auto-save. |
|
void |
registerSettings(java.lang.String key)
Registers component for settings auto-save. |
|
void |
registerSettings(java.lang.String key,
boolean loadInitialSettings,
boolean applySettingsChanges)
Registers component for settings auto-save. |
|
|
registerSettings(java.lang.String key,
java.lang.Class<V> defaultValueClass)
Registers component for settings auto-save. |
|
|
registerSettings(java.lang.String key,
java.lang.Class<V> defaultValueClass,
boolean loadInitialSettings,
boolean applySettingsChanges)
Registers component for settings auto-save. |
|
void |
registerSettings(java.lang.String key,
java.lang.Object defaultValue)
Registers component for settings auto-save. |
|
void |
registerSettings(java.lang.String key,
java.lang.Object defaultValue,
boolean loadInitialSettings,
boolean applySettingsChanges)
Registers component for settings auto-save. |
|
void |
registerSettings(java.lang.String group,
java.lang.String key)
Registers component for settings auto-save. |
|
|
registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Class<V> defaultValueClass)
Registers component for settings auto-save. |
|
|
registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Class<V> defaultValueClass,
boolean loadInitialSettings,
boolean applySettingsChanges)
Registers component for settings auto-save. |
|
void |
registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Object defaultValue)
Registers component for settings auto-save. |
|
void |
registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Object defaultValue,
boolean loadInitialSettings,
boolean applySettingsChanges)
Registers component for settings auto-save. |
|
void |
removeDocumentListener(DocumentListener<T> listener)
Removes document listener. |
|
void |
removeDocumentPaneListener(DocumentPaneListener<T> listener)
Removes document pane listener. |
|
protected StructureData<T> |
restoreStructureStateImpl(DocumentPaneState state,
java.util.Map<java.lang.String,T> documents)
Restores document pane state starting from the specified structure. |
|
void |
saveSettings()
Saves component settings. |
|
void |
selectNext()
Increments selected document index inside the active pane. |
|
void |
selectPrevious()
Decrements selected document index inside the active pane. |
|
void |
setCloseable(boolean closeable)
Sets whether tabs in this document pane should be globally closable or not. |
|
void |
setDocumentPaneState(DocumentPaneState state)
Restores document pane state. |
|
void |
setDocumentsProvider(DocumentDataProvider<T> provider)
Sets custom documents provider. |
|
void |
setDragBetweenPanesEnabled(boolean dragBetweenPanesEnabled)
Sets whether tabs drag between different tabbed panes is enabled or not. |
|
void |
setDragEnabled(boolean dragEnabled)
Sets whether tabs drag is enabled or not. |
|
void |
setSelected(DocumentData document)
Sets document selected inside its pane. |
|
void |
setSelected(int index)
Sets selected document index inside the active pane. |
|
void |
setSelected(java.lang.String id)
Sets document with the specified ID selected inside its pane. |
|
void |
setSplitEnabled(boolean splitEnabled)
Sets whether split creation is enabled or not. |
|
void |
setSplitPaneCustomizer(Customizer<WebSplitPane> customizer)
Sets split pane customizer and applies it to existing panes. |
|
void |
setStructureRoot(StructureData root)
Sets new root element data. |
|
void |
setTabbedPaneCustomizer(Customizer<WebTabbedPane> customizer)
Sets tabbed pane customizer and applies it to existing panes. |
|
void |
setTabMenuEnabled(boolean tabMenuEnabled)
Sets whether tab menu is enabled or not. |
|
void |
setTabTitleComponentProvider(TabTitleComponentProvider<T> provider)
Sets document tab title component provider. |
|
protected PaneData<T> |
split(PaneData<T> splittedPane,
T movedDocument,
int direction)
Splits specified pane into two panes using the specified direction to decide split settings. |
|
void |
split(T movedDocument,
int direction)
Splits document's pane into two panes using the specified direction to decide split settings. |
|
void |
unregisterSettings()
Unregisters component from settings auto-save. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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 |
Field Detail |
---|
public static final javax.swing.ImageIcon closeTabIcon
public static final javax.swing.ImageIcon closeTabRolloverIcon
protected static final java.lang.String DATA_KEY
protected java.util.List<DocumentListener<T extends DocumentData>> documentListeners
protected java.util.List<DocumentPaneListener<T extends DocumentData>> documentPaneListeners
protected final java.lang.String id
protected StructureData root
protected PaneData<T extends DocumentData> activePane
protected Customizer<WebTabbedPane> tabbedPaneCustomizer
protected TabTitleComponentProvider<T extends DocumentData> tabTitleComponentProvider
protected Customizer<WebSplitPane> splitPaneCustomizer
protected boolean closeable
protected boolean dragEnabled
protected boolean dragBetweenPanesEnabled
protected boolean splitEnabled
protected boolean tabMenuEnabled
protected java.lang.ref.WeakReference<T extends DocumentData> previouslySelected
protected DocumentDataProvider<T extends DocumentData> documentsProvider
Constructor Detail |
---|
public WebDocumentPane()
public WebDocumentPane(Customizer<WebTabbedPane> tabbedPaneCustomizer)
tabbedPaneCustomizer
- tabbed pane customizerpublic WebDocumentPane(TabTitleComponentProvider<T> tabTitleComponentProvider)
tabTitleComponentProvider
- tab title component customizerpublic WebDocumentPane(Customizer<WebTabbedPane> tabbedPaneCustomizer, TabTitleComponentProvider<T> tabTitleComponentProvider)
tabbedPaneCustomizer
- tabbed pane customizertabTitleComponentProvider
- tab title component customizerpublic WebDocumentPane(Customizer<WebSplitPane> splitPaneCustomizer, Customizer<WebTabbedPane> tabbedPaneCustomizer)
splitPaneCustomizer
- split pane customizertabbedPaneCustomizer
- tabbed pane customizerpublic WebDocumentPane(Customizer<WebSplitPane> splitPaneCustomizer, Customizer<WebTabbedPane> tabbedPaneCustomizer, TabTitleComponentProvider<T> tabTitleComponentProvider)
splitPaneCustomizer
- split pane customizertabbedPaneCustomizer
- tabbed pane customizertabTitleComponentProvider
- tab title component customizerMethod Detail |
---|
protected TabTitleComponentProvider<T> createDefaultTabTitleComponentProvider()
public java.lang.String getId()
public Customizer<WebTabbedPane> getTabbedPaneCustomizer()
public void setTabbedPaneCustomizer(Customizer<WebTabbedPane> customizer)
customizer
- new tabbed pane customizerpublic TabTitleComponentProvider<T> getTabTitleComponentProvider()
public void setTabTitleComponentProvider(TabTitleComponentProvider<T> provider)
provider
- new document tab title component providerpublic Customizer<WebSplitPane> getSplitPaneCustomizer()
public void setSplitPaneCustomizer(Customizer<WebSplitPane> customizer)
customizer
- new split pane customizerpublic boolean isCloseable()
public void setCloseable(boolean closeable)
closeable
- whether tabs in this document pane should be globally closable or notpublic boolean isDragEnabled()
public void setDragEnabled(boolean dragEnabled)
dragEnabled
- whether tabs drag is enabled or notpublic boolean isDragBetweenPanesEnabled()
public void setDragBetweenPanesEnabled(boolean dragBetweenPanesEnabled)
dragBetweenPanesEnabled
- whether tabs drag between different tabbed panes is enabled or notpublic boolean isSplitEnabled()
public void setSplitEnabled(boolean splitEnabled)
splitEnabled
- true if split creation is enabled, false otherwisepublic boolean isTabMenuEnabled()
public void setTabMenuEnabled(boolean tabMenuEnabled)
tabMenuEnabled
- whether tab menu is enabled or notpublic StructureData getStructureRoot()
public void setStructureRoot(StructureData root)
root
- new root element dataprotected void init()
public void split(T movedDocument, int direction)
movedDocument
- document that should be moved to new panedirection
- split directionprotected PaneData<T> split(PaneData<T> splittedPane, T movedDocument, int direction)
splittedPane
- pane that will be splittedmovedDocument
- document that should be moved from splitted pane to new onedirection
- split direction
public void merge(StructureData toMerge)
toMerge
- structure element to mergeprotected void mergeImpl(SplitData<T> splitData)
splitData
- split element to mergepublic PaneData<T> getActivePane()
protected void activate(PaneData<T> paneData)
paneData
- new active paneprotected void activate(T document)
document
- document to activatepublic T getSelectedDocument()
public T getDocument(int index)
index
- active pane tab index
public T getDocument(java.lang.String id)
id
- document ID
public java.util.List<T> getDocuments()
public int getDocumentsCount()
public java.util.List<PaneData<T>> getAllPanes()
protected void collectPanes(StructureData structureData, java.util.List<PaneData<T>> panes)
structureData
- structure elementpanes
- PaneData listpublic java.util.List<SplitData<T>> getAllSplitPanes()
protected void collectSplitPanes(StructureData structureData, java.util.List<SplitData<T>> splits)
structureData
- structure elementsplits
- SplitData listpublic PaneData<T> getPane(T document)
document
- document to look for
public PaneData<T> getPane(java.lang.String documentId)
documentId
- ID of the document to look for
public void setSelected(int index)
index
- index of the document to selectpublic void selectPrevious()
public void selectNext()
public void setSelected(DocumentData document)
document
- document to selectpublic void setSelected(java.lang.String id)
id
- ID of the document to selectpublic boolean isDocumentOpened(T document)
document
- document to look for
public boolean isDocumentOpened(java.lang.String documentId)
documentId
- ID of the document to look for
public void openDocument(java.lang.String documentId)
documentId
- ID of the document to openpublic void openDocument(T document)
document
- document to openpublic void closeDocument(int index)
index
- index of the document to closepublic void closeDocument(java.lang.String id)
id
- ID of the document to closepublic void closeDocument(T document)
document
- document to closepublic void closeAll()
protected void checkSelection()
public DocumentDataProvider<T> getDocumentsProvider()
public void setDocumentsProvider(DocumentDataProvider<T> provider)
provider
- custom documents providerpublic DocumentPaneState getDocumentPaneState()
DocumentPaneState
,
setDocumentPaneState(DocumentPaneState)
protected DocumentPaneState getDocumentPaneStateImpl(StructureData structure)
structure
- structure level to start retrieving document pane state from
public void setDocumentPaneState(DocumentPaneState state)
state
- document pane state to restoreDocumentPaneState
,
getDocumentPaneState()
protected StructureData<T> restoreStructureStateImpl(DocumentPaneState state, java.util.Map<java.lang.String,T> documents)
state
- document pane state to restoredocuments
- existing documentspublic void addDocumentPaneListener(DocumentPaneListener<T> listener)
listener
- new document pane listenerpublic void removeDocumentPaneListener(DocumentPaneListener<T> listener)
listener
- document pane listenerpublic void fireSplitted(PaneData<T> splittedPane, SplitData<T> newSplitData)
splittedPane
- splitted PaneDatanewSplitData
- newly created SplitDatapublic void fireMerged(SplitData<T> mergedSplit, StructureData<T> newStructureData)
mergedSplit
- merged SplitDatanewStructureData
- newly created StructureDatapublic void fireOrientationChanged(SplitData<T> splitData)
splitData
- SplitData which orientation has changedpublic void fireSidesSwapped(SplitData<T> splitData)
splitData
- SplitData which sides were swappedpublic void fireDividerLocationChanged(SplitData<T> splitData)
splitData
- SplitData which divider location has changedpublic void addDocumentListener(DocumentListener<T> listener)
listener
- new document listenerpublic void removeDocumentListener(DocumentListener<T> listener)
listener
- document listenerpublic void fireDocumentOpened(T document, PaneData<T> pane, int index)
document
- opened documentpane
- document's paneindex
- document's indexpublic void fireDocumentSelected(T document, PaneData<T> pane, int index)
document
- selected documentpane
- document's paneindex
- document's indexpublic boolean fireDocumentClosing(T document, PaneData<T> pane, int index)
document
- closing documentpane
- document's paneindex
- document's index
public void fireDocumentClosed(T document, PaneData<T> pane, int index)
document
- closed documentpane
- document's paneindex
- document's indexpublic DocumentAdapter<T> onDocumentOpen(DocumentDataRunnable<T> runnable)
onDocumentOpen
in interface DocumentPaneEventMethods<T extends DocumentData>
runnable
- document data runnable
public DocumentAdapter<T> onDocumentSelection(DocumentDataRunnable<T> runnable)
onDocumentSelection
in interface DocumentPaneEventMethods<T extends DocumentData>
runnable
- document data runnable
public DocumentAdapter<T> onDocumentClosing(DocumentDataCancellableRunnable<T> runnable)
onDocumentClosing
in interface DocumentPaneEventMethods<T extends DocumentData>
runnable
- document data cancellable runnable
public DocumentAdapter<T> onDocumentClose(DocumentDataRunnable<T> runnable)
onDocumentClose
in interface DocumentPaneEventMethods<T extends DocumentData>
runnable
- document data runnable
public void registerSettings(java.lang.String key)
registerSettings
in interface SettingsMethods
key
- component settings keypublic <V extends DefaultValue> void registerSettings(java.lang.String key, java.lang.Class<V> defaultValueClass)
registerSettings
in interface SettingsMethods
V
- default value typekey
- component settings keydefaultValueClass
- component default value classDefaultValue
public void registerSettings(java.lang.String key, java.lang.Object defaultValue)
registerSettings
in interface SettingsMethods
key
- component settings keydefaultValue
- component default valuepublic void registerSettings(java.lang.String group, java.lang.String key)
registerSettings
in interface SettingsMethods
group
- component settings groupkey
- component settings keypublic <V extends DefaultValue> void registerSettings(java.lang.String group, java.lang.String key, java.lang.Class<V> defaultValueClass)
registerSettings
in interface SettingsMethods
V
- default value typegroup
- component settings groupkey
- component settings keydefaultValueClass
- component default value classDefaultValue
public void registerSettings(java.lang.String group, java.lang.String key, java.lang.Object defaultValue)
registerSettings
in interface SettingsMethods
group
- component settings groupkey
- component settings keydefaultValue
- component default valuepublic void registerSettings(java.lang.String key, boolean loadInitialSettings, boolean applySettingsChanges)
registerSettings
in interface SettingsMethods
key
- component settings keyloadInitialSettings
- whether to load initial available settings into the component or notapplySettingsChanges
- whether to apply settings changes to the component or notpublic <V extends DefaultValue> void registerSettings(java.lang.String key, java.lang.Class<V> defaultValueClass, boolean loadInitialSettings, boolean applySettingsChanges)
registerSettings
in interface SettingsMethods
V
- default value typekey
- component settings keydefaultValueClass
- component default value classloadInitialSettings
- whether to load initial available settings into the component or notapplySettingsChanges
- whether to apply settings changes to the component or notDefaultValue
public void registerSettings(java.lang.String key, java.lang.Object defaultValue, boolean loadInitialSettings, boolean applySettingsChanges)
registerSettings
in interface SettingsMethods
key
- component settings keydefaultValue
- component default valueloadInitialSettings
- whether to load initial available settings into the component or notapplySettingsChanges
- whether to apply settings changes to the component or notpublic <V extends DefaultValue> void registerSettings(java.lang.String group, java.lang.String key, java.lang.Class<V> defaultValueClass, boolean loadInitialSettings, boolean applySettingsChanges)
registerSettings
in interface SettingsMethods
V
- default value typegroup
- component settings groupkey
- component settings keydefaultValueClass
- component default value classloadInitialSettings
- whether to load initial available settings into the component or notapplySettingsChanges
- whether to apply settings changes to the component or notDefaultValue
public void registerSettings(java.lang.String group, java.lang.String key, java.lang.Object defaultValue, boolean loadInitialSettings, boolean applySettingsChanges)
registerSettings
in interface SettingsMethods
group
- component settings groupkey
- component settings keydefaultValue
- component default valueloadInitialSettings
- whether to load initial available settings into the component or notapplySettingsChanges
- whether to apply settings changes to the component or notpublic void registerSettings(SettingsProcessor settingsProcessor)
registerSettings
in interface SettingsMethods
settingsProcessor
- component settings processorpublic void unregisterSettings()
unregisterSettings
in interface SettingsMethods
public void loadSettings()
loadSettings
in interface SettingsMethods
public void saveSettings()
saveSettings
in interface SettingsMethods
public static <T extends DocumentData> PaneData<T> getData(WebTabbedPane tabbedPane)
T
- document typetabbedPane
- tabbed pane component
public static <T extends DocumentData> SplitData<T> getData(WebSplitPane splitPane)
T
- document typesplitPane
- split pane component
public static boolean isEmptyPane(StructureData data)
data
- structure element to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |