|
||||||||||
| 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
org.openbp.jaspira.gui.plugin.TabbedPluginContainer
public class TabbedPluginContainer
A tabbed plugin container displays plugins in a combination of tabbed panes and tabs themselves. It supports DnD of tabs to other plugin containers.
| Nested Class Summary | |
|---|---|
static class |
TabbedPluginContainer.ChangeAction
Action that selects the next component to the left. |
static class |
TabbedPluginContainer.NumberAction
Action that selects the component with the given number. |
| 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 | |
|---|---|
static TabbedPluginContainer.NumberAction[] |
numberActions
Contains the actions for selecting a given tab. |
protected javax.swing.JTabbedPane |
tabbedPane
The TabbedPane which holds the actual data. |
| 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 org.openbp.jaspira.gui.plugin.PluginContainer |
|---|
CENTER, EAST, NORTH, REGION_CENTER, REGION_EAST, REGION_NORTH, REGION_SOUTH, REGION_WEST, SOUTH, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
TabbedPluginContainer()
Constructor. |
|
TabbedPluginContainer(PluginState state)
Constructor. |
|
TabbedPluginContainer(VisiblePlugin plugin)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addContainer(PluginContainer pc)
Adds all Plugins of the given Container to this pane. |
void |
addPlugin(VisiblePlugin p)
Adds a plugin as last tab and show it. |
void |
addPlugin(VisiblePlugin p,
boolean activateplugin)
Adds a plugin as the last tab. |
void |
addPlugin(VisiblePlugin p,
int slot)
Adds a plugin to a given slot, i\.e\. at a certain tabindex. |
boolean |
canDrag()
If this returns false, no dragging is permitted. |
protected void |
createTabPane()
Creates the tab pane if not done yet. |
void |
dragActionTriggered(java.lang.Object regionId,
java.awt.Point p)
We do not react to any action events per default. |
void |
dragEnded(java.awt.datatransfer.Transferable transferable)
We do not react to any drag events per default. |
void |
dragStarted(java.awt.datatransfer.Transferable transferable)
We do not react to any drag events per default. |
void |
dropAccepted(java.awt.datatransfer.Transferable t)
Called when the drag has been accepted by a InteractionClient, but before it is actually imported. |
void |
dropCanceled(java.awt.datatransfer.Transferable t)
Called when the drag action has been aborted, either by dropping upon a non- qualifying target or because the target reported an unsuccessful drop. |
void |
dropPerformed(java.awt.datatransfer.Transferable t)
Called when the drop has been performed and the object has been inserted. |
VisiblePlugin |
getActivePlugin()
Returns the currently active plugin, which is incidently the visible plugin. |
java.util.List |
getAllDropRegions(java.util.List flavors,
java.awt.datatransfer.Transferable data,
java.awt.event.MouseEvent mouseEvent)
Returns a list of all regions of this client AND possible sub clients. |
java.util.List |
getAllImportersAt(java.awt.Point p)
Returns all importers which will be accepted at the given point by this client or one of its sub clients. |
MultiIcon |
getDragImage()
Gets the image for the construction of the drag cursor. |
java.util.List |
getDropRegions(java.util.List flavors,
java.awt.datatransfer.Transferable data,
java.awt.event.MouseEvent mouseEvent)
Standard regions for a plugin container are regions at the four corners as well as the on the plugin itself. |
java.util.List |
getImportersAt(java.awt.Point p)
Returns all importers which will be accepted at the given point by this client. |
int |
getNumberOfPlugins()
Returns the number of plugins in this container. |
JaspiraPage |
getPage()
Returns the page level parent plugin of this plugin. |
PluginContainer |
getParentContainer()
Returns the parent Container of this tabbed pane (always a PluginDivider). |
java.util.List |
getPlugins()
Returns the list of plugins held by this container. |
VisiblePlugin |
getSelectedPlugin()
Returns the plugin that is currently visible. |
java.util.List |
getSubClients()
Returns all sub clients. |
java.awt.datatransfer.Transferable |
getTranferableAt(java.awt.Point p)
Returns the Transferable for a drag Operation starting at . |
java.util.List |
getVisiblePlugins()
Returns a list containing the currently visible plugin. |
boolean |
importData(java.lang.Object regionId,
java.awt.datatransfer.Transferable data,
java.awt.Point p)
Imports the data from the given DragAwareRegion. |
boolean |
isAlwaysTabs()
Gets the flag if the container should always show tabs, even if only one plugin is showed. |
boolean |
isSolid()
Gets the flag if the container is solid, i\.e\. doesn't remove itself if it is empty. |
void |
removePlugin(VisiblePlugin p)
Remove a plugin from this container. |
void |
setAlwaysTabs(boolean alwaysTabs)
Sets the flag if the container should always show tabs, even if only one plugin is showed. |
void |
setSelectedPlugin(VisiblePlugin plugin)
Makes the given plugin visible. |
void |
setSolid(boolean solid)
Sets the flag if the container is solid, i\.e\. doesn't remove itself if it is empty. |
void |
sliceContainer(PluginContainer toInsert,
PluginContainer currentContainer,
java.lang.String constraint)
Hand the slice request up to the parent. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
Request the focus for the newly activated plugin on tab change by the user. |
protected void |
synchronizeComponents(VisiblePlugin pluginToActivate,
boolean preventFocusChange)
Synchronizes the components of the container with the list of plugins. |
java.lang.String |
toString()
Returns a string representation of this object. |
void |
updateContainer(boolean fullRebuild)
Rebuilds the enviroment of the container (title, toolbar, menu). |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| 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, getPreferredSize, 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, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final TabbedPluginContainer.NumberAction[] numberActions
protected javax.swing.JTabbedPane tabbedPane
| Constructor Detail |
|---|
public TabbedPluginContainer()
public TabbedPluginContainer(VisiblePlugin plugin)
plugin - Plugin to add to the containerpublic TabbedPluginContainer(PluginState state)
state - Creates a container that contains a new plugin that will be
constructed from the given plugin state using the PluginMgr| Method Detail |
|---|
public java.lang.String toString()
toString in class java.awt.Componentprotected void createTabPane()
public boolean isSolid()
public void setSolid(boolean solid)
public boolean isAlwaysTabs()
public void setAlwaysTabs(boolean alwaysTabs)
public void addContainer(PluginContainer pc)
public void addPlugin(VisiblePlugin p)
addPlugin in interface PluginContainerp - Plugin to add
public void addPlugin(VisiblePlugin p,
boolean activateplugin)
public void addPlugin(VisiblePlugin p,
int slot)
public void sliceContainer(PluginContainer toInsert,
PluginContainer currentContainer,
java.lang.String constraint)
sliceContainer in interface PluginContainerconstraint - PluginContainer.NORTH/PluginContainer.SOUTH/PluginContainer.EAST/PluginContainer.WESTtoInsert - Containert to insertcurrentContainer - Currrent container that shall be replacedpublic void removePlugin(VisiblePlugin p)
removePlugin in interface PluginContainerp - Plugin to remove
protected void synchronizeComponents(VisiblePlugin pluginToActivate,
boolean preventFocusChange)
pluginToActivate - Plugin to active after the synchronization or nullpreventFocusChange - true Does not change the currently focused plugin.public PluginContainer getParentContainer()
PluginDivider).
getParentContainer in interface PluginContainerpublic VisiblePlugin getSelectedPlugin()
public void setSelectedPlugin(VisiblePlugin plugin)
plugin - Plugin to showpublic int getNumberOfPlugins()
public java.util.List getPlugins()
getPlugins in interface PluginContainerVisiblePlugin objectspublic java.util.List getVisiblePlugins()
getVisiblePlugins in interface PluginContainerVisiblePlugin objects or nullpublic VisiblePlugin getActivePlugin()
getActivePlugin in interface PluginContainerpublic void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged in interface javax.swing.event.ChangeListenerpublic void dragStarted(java.awt.datatransfer.Transferable transferable)
dragStarted in interface InteractionClienttransferable - Transferable to be draggedpublic void dragEnded(java.awt.datatransfer.Transferable transferable)
dragEnded in interface InteractionClienttransferable - Transferable that has been dragged
public void dragActionTriggered(java.lang.Object regionId,
java.awt.Point p)
dragActionTriggered in interface InteractionClientregionId - Id of the region to import into (see BasicDropRegion.getId)p - Current mouse position in screen coordinates
public java.util.List getDropRegions(java.util.List flavors,
java.awt.datatransfer.Transferable data,
java.awt.event.MouseEvent mouseEvent)
getDropRegions in interface InteractionClientflavors - List of data flavors to checkdata - Transferable to be importedmouseEvent - Mouse event that initiated the drag action
DragAwareRegion object or null if the drop client
cannot satisfy at least one of the supplied data flavors.InteractionClient.getDropRegions(List, Transferable, MouseEvent)
public final java.util.List getAllDropRegions(java.util.List flavors,
java.awt.datatransfer.Transferable data,
java.awt.event.MouseEvent mouseEvent)
InteractionClient
getAllDropRegions in interface InteractionClientflavors - List of data flavors to checkdata - Transferable to importmouseEvent - Mouse event that initiated the drag action
DragAwareRegion object or null if the drop client
or one of its sub clients cannot satisfy at least one of the supplied data flavorsInteractionClient.getAllDropRegions(List, Transferable, MouseEvent)public java.util.List getImportersAt(java.awt.Point p)
InteractionClient
getImportersAt in interface InteractionClientp - Current mouse position in screen coordinates
Importer objects or nullpublic java.util.List getAllImportersAt(java.awt.Point p)
InteractionClient
getAllImportersAt in interface InteractionClientp - Current mouse position in screen coordinates
Importer objects or null
public boolean importData(java.lang.Object regionId,
java.awt.datatransfer.Transferable data,
java.awt.Point p)
importData in interface InteractionClientregionId - Id of the region to import into (see BasicDropRegion.getId)data - Transferable to importp - Drop point in glass coordinates
public java.util.List getSubClients()
getSubClients in interface InteractionClientpublic void updateContainer(boolean fullRebuild)
fullRebuild - true Causes a full container environment including menu and toolbar rebuildpublic JaspiraPage getPage()
getPage in interface PluginContainerpublic boolean canDrag()
DragOrigin
canDrag in interface DragOriginpublic void dropAccepted(java.awt.datatransfer.Transferable t)
DragOrigin
dropAccepted in interface DragOrigint - Dragged transferablepublic void dropCanceled(java.awt.datatransfer.Transferable t)
DragOrigin
dropCanceled in interface DragOrigint - Dragged transferablepublic void dropPerformed(java.awt.datatransfer.Transferable t)
DragOrigin
dropPerformed in interface DragOrigint - Dragged transferablepublic java.awt.datatransfer.Transferable getTranferableAt(java.awt.Point p)
DragOrigin
getTranferableAt in interface DragOriginp - The location at which the drag started in component local coordinates
public MultiIcon getDragImage()
DragOrigin
getDragImage in interface DragOrigin
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||