Class TabFrameContentPane
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- com.github.weisj.darklaf.components.tabframe.TabFrameContentPane
-
- All Implemented Interfaces:
TabFrameContent
,ImageObserver
,MenuContainer
,Serializable
,Accessible
public class TabFrameContentPane extends JPanel implements TabFrameContent
Content pane forJTabFrame
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
TabFrameContentPane.LayoutProportions
protected static class
TabFrameContentPane.LayoutWeights
protected static class
TabFrameContentPane.TabFrameSplitPane
-
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
-
Field Summary
Fields Modifier and Type Field Description protected ToggleSplitPane
bottomSplit
protected ToggleSplitPane
bottomSplitter
protected Component
cont
protected boolean[]
enabled
protected static double
HORIZONTAL_PROP_LEFT
protected static double
HORIZONTAL_PROP_RIGHT
protected ToggleSplitPane
leftSplit
protected ToggleSplitPane
leftSplitter
protected ToggleSplitPane
rightSplit
protected ToggleSplitPane
rightSplitter
protected ToggleSplitPane
topSplit
protected ToggleSplitPane
topSplitter
protected static double
VERTICAL_PROP_BOTTOM
protected static double
VERTICAL_PROP_TOP
-
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 TabFrameContentPane()
-
Method Summary
Modifier and Type Method Description protected ToggleSplitPane
createSplitPane(String name)
void
disableAll(boolean force)
Component
getComponent()
Get the component that displays the content.PopupContainer
getContainer(com.github.weisj.darklaf.util.Alignment alignment)
Get the popup container at the given location.Component
getContent()
Get the current component displayed in the middle.Component
getPopupComponent(com.github.weisj.darklaf.util.Alignment a)
Get the popup component at the position.boolean[]
getStatus()
Get the status of the individual panels.boolean
isEnabled(com.github.weisj.darklaf.util.Alignment a)
Returns whether the corresponding panel is currently enabled/visible.void
setComponentAt(com.github.weisj.darklaf.util.Alignment a, Component c)
Sets the component at the specified position.void
setContent(Component pane)
Sets the content to displayed in the middle.void
setEnabled(com.github.weisj.darklaf.util.Alignment a, boolean enabled)
Show or hide the corresponding panel.void
setEnabled(com.github.weisj.darklaf.util.Alignment a, boolean enabled, boolean force)
Show or hide the corresponding panel.protected <T> void
setupSplitPanes(BiConsumer<? super ToggleSplitPane,T> consumer, T flag)
protected <T> void
setupSplitterPanes(BiConsumer<? super ToggleSplitPane,T> consumer, T flag)
-
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, 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
-
-
-
-
Field Detail
-
HORIZONTAL_PROP_LEFT
protected static final double HORIZONTAL_PROP_LEFT
- See Also:
- Constant Field Values
-
VERTICAL_PROP_TOP
protected static final double VERTICAL_PROP_TOP
- See Also:
- Constant Field Values
-
VERTICAL_PROP_BOTTOM
protected static final double VERTICAL_PROP_BOTTOM
- See Also:
- Constant Field Values
-
HORIZONTAL_PROP_RIGHT
protected static final double HORIZONTAL_PROP_RIGHT
- See Also:
- Constant Field Values
-
topSplit
protected final ToggleSplitPane topSplit
-
bottomSplit
protected final ToggleSplitPane bottomSplit
-
leftSplit
protected final ToggleSplitPane leftSplit
-
rightSplit
protected final ToggleSplitPane rightSplit
-
leftSplitter
protected final ToggleSplitPane leftSplitter
-
rightSplitter
protected final ToggleSplitPane rightSplitter
-
topSplitter
protected final ToggleSplitPane topSplitter
-
bottomSplitter
protected final ToggleSplitPane bottomSplitter
-
enabled
protected final boolean[] enabled
-
cont
protected Component cont
-
-
Method Detail
-
createSplitPane
protected ToggleSplitPane createSplitPane(String name)
-
setupSplitterPanes
protected <T> void setupSplitterPanes(BiConsumer<? super ToggleSplitPane,T> consumer, T flag)
-
setupSplitPanes
protected <T> void setupSplitPanes(BiConsumer<? super ToggleSplitPane,T> consumer, T flag)
-
disableAll
public void disableAll(boolean force)
-
setEnabled
public void setEnabled(com.github.weisj.darklaf.util.Alignment a, boolean enabled)
Show or hide the corresponding panel.- Specified by:
setEnabled
in interfaceTabFrameContent
- Parameters:
a
- position of panel.enabled
- true if should be shown.
-
setEnabled
public void setEnabled(com.github.weisj.darklaf.util.Alignment a, boolean enabled, boolean force)
Show or hide the corresponding panel.- Parameters:
a
- position of panel.enabled
- true if should be shown.force
- whether to force the layout process.
-
getContent
public Component getContent()
Description copied from interface:TabFrameContent
Get the current component displayed in the middle.- Specified by:
getContent
in interfaceTabFrameContent
- Returns:
- the content component.
-
setContent
public void setContent(Component pane)
Description copied from interface:TabFrameContent
Sets the content to displayed in the middle.- Specified by:
setContent
in interfaceTabFrameContent
- Parameters:
pane
- the content component.
-
isEnabled
public boolean isEnabled(com.github.weisj.darklaf.util.Alignment a)
Returns whether the corresponding panel is currently enabled/visible.- Specified by:
isEnabled
in interfaceTabFrameContent
- Parameters:
a
- the position of the panel.- Returns:
- true if enabled.
-
setComponentAt
public void setComponentAt(com.github.weisj.darklaf.util.Alignment a, Component c)
Description copied from interface:TabFrameContent
Sets the component at the specified position.- Specified by:
setComponentAt
in interfaceTabFrameContent
- Parameters:
a
- the alignment.c
- the component.
-
getComponent
public Component getComponent()
Description copied from interface:TabFrameContent
Get the component that displays the content.- Specified by:
getComponent
in interfaceTabFrameContent
- Returns:
- the display component.
-
getStatus
public boolean[] getStatus()
Get the status of the individual panels.- Specified by:
getStatus
in interfaceTabFrameContent
- Returns:
- array of status of panels.
-
getContainer
public PopupContainer getContainer(com.github.weisj.darklaf.util.Alignment alignment)
Description copied from interface:TabFrameContent
Get the popup container at the given location.- Specified by:
getContainer
in interfaceTabFrameContent
- Parameters:
alignment
- the alignment position.- Returns:
- the popup container.
-
getPopupComponent
public Component getPopupComponent(com.github.weisj.darklaf.util.Alignment a)
Get the popup component at the position.- Parameters:
a
- the position.- Returns:
- the popup component at position.
-
-