Class Dockable

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

    public class Dockable
    extends javax.swing.JPanel
    A lightweight component derived from JPanel that features certain subcomponents that make it look similar to a frame or internal frame. It shows a titlebar above its content component. The title bar has an optional icon on the left, a title text and an optional toolbar on the right.
    See Also:
    Serialized Form
    • Nested 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

      • Fields inherited from class javax.swing.JComponent

        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

        accessibleContext, 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

      Constructors 
      Constructor Description
      Dockable​(JDockingPanel dockingPanel, javax.swing.JComponent content, java.lang.String title, java.awt.event.ActionListener al, boolean isClosable)
      Constructs a TitledComponent with the specified title and content panel.
      Dockable​(JDockingPanel dockingPanel, javax.swing.JComponent content, java.lang.String title, java.awt.event.ActionListener al, boolean isClosable, boolean hasMenuButton)
      Constructs a TitledComponent with the specified title and content panel.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.swing.JComponent borrowContent()
      Removes the content temporarily to be added to another container Must be followed later by a endBorrowContent() call.
      void endBorrowContent()
      Returns the content from temporarily adding it to another copntainer.
      javax.swing.JComponent getContent()
      Returns the content - null, if none has been set.
      java.awt.Component getDragHandle()  
      PopupProvider getPopupProvider()  
      java.lang.String getTitle()
      Returns the title of dockable header.
      boolean hasMenuButton()  
      boolean isMaximized()  
      boolean isSelected()
      Answers if the panel is currently selected, i.e.
      boolean isVisibleDockable()
      Answers if the panel is currently visible, i.e.
      protected void notifyVisibility​(boolean isVisible)
      Method used by the JDockingPanel to inform the dockable when its visibility changes.
      void setContentMinimumSize​(java.awt.Dimension size)
      Sets the minimum size of the encapsulated content component and sets the minimum width of the dockable header.
      void setPopupProvider​(PopupProvider p)  
      void setSelected​(boolean selected)
      This panel draws its title bar differently if it is selected, which may be used to indicate to the user that this panel has the focus, or should get more attention than other simple internal frames.
      void setTitle​(java.lang.String newText)
      Sets a new title text of the dockable header.
      void updateUI()
      Updates the UI.
      • 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, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Dockable

        public Dockable​(JDockingPanel dockingPanel,
                        javax.swing.JComponent content,
                        java.lang.String title,
                        java.awt.event.ActionListener al,
                        boolean isClosable)
        Constructs a TitledComponent with the specified title and content panel.
        Parameters:
        content -
        title - the initial title, which must be unique within the JDockingPanel
        al - the ActionListener to receive close_ and max_<title> action commands</dd> <dd><code>isClosable</code> - determines whether the title area contains a close button</dd> </dl> </li> </ul> <a id="<init>(com.actelion.research.gui.dock.JDockingPanel,javax.swing.JComponent,java.lang.String,java.awt.event.ActionListener,boolean,boolean)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>Dockable</h4> <pre>public Dockable​(<a href="JDockingPanel.html" title="class in com.actelion.research.gui.dock">JDockingPanel</a> dockingPanel, javax.swing.JComponent content, java.lang.String title, java.awt.event.ActionListener al, boolean isClosable, boolean hasMenuButton)</pre> <div class="block">Constructs a <code>TitledComponent</code> with the specified title and content panel.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>content</code> - </dd> <dd><code>title</code> - the initial title, which must be unique within the JDockingPanel</dd> <dd><code>al</code> - the ActionListener to receive close_<i>title</i>, max_<i>title</i> and popup_<i>title</i> action events</dd> <dd><code>isClosable</code> - determines whether the title area contains a close button</dd> <dd><code>hasMenuButton</code> - determines whether the title area contains a pupup button</dd> </dl> </li> </ul> </li> </ul> </section> <!-- ============ METHOD DETAIL ========== --> <section role="region"> <ul class="blockList"> <li class="blockList"><a id="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a id="setContentMinimumSize(java.awt.Dimension)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setContentMinimumSize</h4> <pre class="methodSignature">public void setContentMinimumSize​(java.awt.Dimension size)</pre> <div class="block">Sets the minimum size of the encapsulated content component and sets the minimum width of the dockable header. This effectively limits the minimum size of the content component.</div> </li> </ul> <a id="getTitle()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getTitle</h4> <pre class="methodSignature">public java.lang.String getTitle()</pre> <div class="block">Returns the title of dockable header.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>String the current title text</dd> </dl> </li> </ul> <a id="setTitle(java.lang.String)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setTitle</h4> <pre class="methodSignature">public void setTitle​(java.lang.String newText)</pre> <div class="block">Sets a new title text of the dockable header.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>newText</code> - the title text to be set</dd> </dl> </li> </ul> <a id="borrowContent()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>borrowContent</h4> <pre class="methodSignature">public javax.swing.JComponent borrowContent()</pre> <div class="block">Removes the content temporarily to be added to another container Must be followed later by a endBorrowContent() call.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the current content</dd> </dl> </li> </ul> <a id="endBorrowContent()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>endBorrowContent</h4> <pre class="methodSignature">public void endBorrowContent()</pre> <div class="block">Returns the content from temporarily adding it to another copntainer. Must be followed later by a returnContent() call.</div> </li> </ul> <a id="getContent()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getContent</h4> <pre class="methodSignature">public javax.swing.JComponent getContent()</pre> <div class="block">Returns the content - null, if none has been set.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the current content</dd> </dl> </li> </ul> <a id="isSelected()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isSelected</h4> <pre class="methodSignature">public boolean isSelected()</pre> <div class="block">Answers if the panel is currently selected, i.e. the active one. In the selected state, the header background is rendered differently.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>boolean</dd> </dl> </li> </ul> <a id="isMaximized()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isMaximized</h4> <pre class="methodSignature">public boolean isMaximized()</pre> </li> </ul> <a id="notifyVisibility(boolean)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>notifyVisibility</h4> <pre class="methodSignature">protected void notifyVisibility​(boolean isVisible)</pre> <div class="block">Method used by the JDockingPanel to inform the dockable when its visibility changes.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>isVisible</code> - new visibility</dd> </dl> </li> </ul> <a id="isVisibleDockable()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isVisibleDockable</h4> <pre class="methodSignature">public boolean isVisibleDockable()</pre> <div class="block">Answers if the panel is currently visible, i.e. docked and not hidden by other dockables in a tabbed pane.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>boolean</dd> </dl> </li> </ul> <a id="setSelected(boolean)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setSelected</h4> <pre class="methodSignature">public void setSelected​(boolean selected)</pre> <div class="block">This panel draws its title bar differently if it is selected, which may be used to indicate to the user that this panel has the focus, or should get more attention than other simple internal frames.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>selected</code> - a boolean, where true means the frame is selected (currently active) and false means it is not</dd> </dl> </li> </ul> <a id="updateUI()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>updateUI</h4> <pre class="methodSignature">public void updateUI()</pre> <div class="block">Updates the UI. In addition to the superclass behavior, we need to update the header component.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>updateUI</code> in class <code>javax.swing.JPanel</code></dd> </dl> </li> </ul> <a id="getDragHandle()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getDragHandle</h4> <pre class="methodSignature">public java.awt.Component getDragHandle()</pre> </li> </ul> <a id="getPopupProvider()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getPopupProvider</h4> <pre class="methodSignature">public <a href="PopupProvider.html" title="interface in com.actelion.research.gui.dock">PopupProvider</a> getPopupProvider()</pre> </li> </ul> <a id="setPopupProvider(com.actelion.research.gui.dock.PopupProvider)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setPopupProvider</h4> <pre class="methodSignature">public void setPopupProvider​(<a href="PopupProvider.html" title="interface in com.actelion.research.gui.dock">PopupProvider</a> p)</pre> </li> </ul> <a id="hasMenuButton()"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>hasMenuButton</h4> <pre class="methodSignature">public boolean hasMenuButton()</pre> </li> </ul> </li> </ul> </section> </li> </ul> </div> </div> </main> <!-- ========= END OF CLASS DATA ========= --> <footer role="contentinfo"> <nav role="navigation"> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a id="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../index.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/Dockable.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li><a href="#nested.class.summary">Nested</a> | </li> <li><a href="#field.summary">Field</a> | </li> <li><a href="#constructor.summary">Constr</a> | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li><a href="#constructor.detail">Constr</a> | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a id="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </nav> <p class="legalCopy"><small>Copyright © 2021 <a href="https://www.idorsia.com">Idorsia Pharmaceuticals Ltd, Hegenheimermattweg 91, CH-4123 Allschwil, Switzerland</a>. All rights reserved.</small></p> </footer> </body> </html>