|
||||||||||
| 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
org.japura.gui.CollapsiblePanel
public class CollapsiblePanel
Copyright (C) 2008-2010 Carlos Eduardo Leite de Andrade
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see www.gnu.org/licenses/
For more information, contact: www.japura.org
| Nested Class Summary |
|---|
| 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 |
|---|
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 | |
|---|---|
CollapsiblePanel()
|
|
CollapsiblePanel(javax.swing.Icon icon,
java.lang.String title)
|
|
CollapsiblePanel(javax.swing.Icon icon,
java.lang.String title,
javax.swing.JComponent[] extraButtons)
|
|
CollapsiblePanel(java.lang.String title)
|
|
CollapsiblePanel(java.lang.String title,
javax.swing.JComponent[] extraButtons)
|
|
| Method Summary | |
|---|---|
java.awt.Component |
add(java.awt.Component comp)
|
java.awt.Component |
add(java.awt.Component comp,
int index)
|
void |
add(java.awt.Component comp,
java.lang.Object constraints)
|
void |
add(java.awt.Component comp,
java.lang.Object constraints,
int index)
|
java.awt.Component |
add(java.lang.String name,
java.awt.Component comp)
|
void |
addCollapsiblePanelListener(CollapsiblePanelListener listener)
|
void |
collapse()
Collapse this panel. |
void |
collapseImmediately()
|
void |
doLayout()
|
void |
expand()
Expand this panel. |
void |
expandImmediately()
|
static java.lang.Object |
getDefaultTitleBackground()
|
java.awt.Font |
getFont()
|
java.awt.Dimension |
getPreferredSize()
|
protected java.awt.Dimension |
getPreferredSize(boolean collapsed)
|
java.awt.Color |
getSeparatorColor()
|
int |
getSpeed()
|
java.lang.Object |
getTitleBackground()
|
java.awt.Color |
getTitleForeground()
|
int |
getTitleMargin()
|
boolean |
hasTitleBackgroundGradient()
|
void |
invalidate()
|
boolean |
isAnimationEnabled()
Determines whether the animation is enabled. |
boolean |
isCollapsed()
Determines whether the panel is collapsed. |
boolean |
isCollapsing()
Determines whether the panel is collapsing. |
boolean |
isExpanded()
Determines whether the panel is expanded. |
boolean |
isExpanding()
Determines whether the panel is expanding. |
boolean |
isInAction()
Determines whether the panel is expanding or collapsing. |
boolean |
isLockEnabled()
|
protected void |
paintBorder(java.awt.Graphics g)
|
protected void |
paintComponent(java.awt.Graphics g)
|
void |
remove(java.awt.Component arg0)
|
void |
remove(int arg0)
|
void |
removeAll()
|
void |
removeCollapsiblePanelListener(CollapsiblePanelListener listener)
|
void |
removeExtraButtons()
|
void |
removeIcon()
|
void |
setAnimationEnabled(boolean animationEnabled)
|
static void |
setDefaultBlackIcons()
|
static void |
setDefaultCollapseIcon(javax.swing.Icon icon)
|
static void |
setDefaultExpandIcon(javax.swing.Icon icon)
|
static void |
setDefaultTitleBackground(java.awt.Color color)
|
static void |
setDefaultTitleBackground(Gradient gradient)
|
static void |
setDefaultWhiteIcons()
|
void |
setExtraButtons(javax.swing.JComponent[] extraButtons)
|
void |
setFont(java.awt.Font font)
|
void |
setIcon(javax.swing.Icon icon)
|
void |
setIcons(javax.swing.Icon iconUp,
javax.swing.Icon iconDown)
|
void |
setLockEnabled(boolean enabled)
Sets whether or not this collapse or expand option's of component is enabled. |
void |
setSeparatorColor(java.awt.Color separatorColor)
|
void |
setSeparatorThickness(int thickness)
Creates a separator line border between title and view with the specified width. |
void |
setSpeed(int speed)
|
void |
setTitle(java.lang.String title)
|
void |
setTitleBackground(java.awt.Color color)
|
void |
setTitleBackground(Gradient gradient)
|
void |
setTitleForeground(java.awt.Color color)
|
void |
setTitleMargin(int titleMargin)
|
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintImmediately, paintImmediately, paramString, 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, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
| Methods inherited from class java.awt.Container |
|---|
addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, 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, 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 |
| Constructor Detail |
|---|
public CollapsiblePanel()
public CollapsiblePanel(java.lang.String title)
public CollapsiblePanel(javax.swing.Icon icon,
java.lang.String title)
public CollapsiblePanel(java.lang.String title,
javax.swing.JComponent[] extraButtons)
public CollapsiblePanel(javax.swing.Icon icon,
java.lang.String title,
javax.swing.JComponent[] extraButtons)
| Method Detail |
|---|
public void removeExtraButtons()
public void setExtraButtons(javax.swing.JComponent[] extraButtons)
public void doLayout()
doLayout in class java.awt.Containerprotected void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentprotected final void paintBorder(java.awt.Graphics g)
paintBorder in class javax.swing.JComponentpublic final java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JComponentprotected java.awt.Dimension getPreferredSize(boolean collapsed)
public void removeIcon()
public void setIcon(javax.swing.Icon icon)
public void setSeparatorThickness(int thickness)
thickness - an integer specifying the width in pixelspublic boolean isCollapsed()
isCollapsing(),
collapse(),
collapseImmediately()public boolean isCollapsing()
isCollapsed(),
collapse(),
collapseImmediately()public boolean isExpanded()
isExpanding(),
expand(),
expandImmediately()public boolean isExpanding()
isExpanded(),
expand(),
expandImmediately()public boolean isAnimationEnabled()
setAnimationEnabled(boolean)public void setAnimationEnabled(boolean animationEnabled)
public void setSpeed(int speed)
public int getSpeed()
public void remove(java.awt.Component arg0)
remove in class java.awt.Containerpublic void remove(int arg0)
remove in class java.awt.Containerpublic void removeAll()
removeAll in class java.awt.Container
public java.awt.Component add(java.awt.Component comp,
int index)
add in class java.awt.Container
public void add(java.awt.Component comp,
java.lang.Object constraints,
int index)
add in class java.awt.Container
public void add(java.awt.Component comp,
java.lang.Object constraints)
add in class java.awt.Containerpublic java.awt.Component add(java.awt.Component comp)
add in class java.awt.Container
public java.awt.Component add(java.lang.String name,
java.awt.Component comp)
add in class java.awt.Containerpublic boolean isLockEnabled()
public void setLockEnabled(boolean enabled)
enabled - true if these options should be enabled, false otherwiseisLockEnabled()public void collapseImmediately()
public void collapse()
collapseImmediately(),
setAnimationEnabled(boolean),
isAnimationEnabled()public void expandImmediately()
public void expand()
expandImmediately(),
setAnimationEnabled(boolean),
isAnimationEnabled()public java.awt.Color getSeparatorColor()
public void setSeparatorColor(java.awt.Color separatorColor)
public java.awt.Font getFont()
getFont in interface java.awt.MenuContainergetFont in class java.awt.Componentpublic void setFont(java.awt.Font font)
setFont in class javax.swing.JComponentpublic void setTitle(java.lang.String title)
public void setTitleForeground(java.awt.Color color)
public java.awt.Color getTitleForeground()
public void setTitleBackground(java.awt.Color color)
public void setTitleBackground(Gradient gradient)
public java.lang.Object getTitleBackground()
public boolean hasTitleBackgroundGradient()
public int getTitleMargin()
public void setTitleMargin(int titleMargin)
public void setIcons(javax.swing.Icon iconUp,
javax.swing.Icon iconDown)
public void addCollapsiblePanelListener(CollapsiblePanelListener listener)
public void removeCollapsiblePanelListener(CollapsiblePanelListener listener)
public boolean isInAction()
public void invalidate()
invalidate in class java.awt.Containerpublic static void setDefaultExpandIcon(javax.swing.Icon icon)
public static void setDefaultCollapseIcon(javax.swing.Icon icon)
public static void setDefaultBlackIcons()
public static void setDefaultWhiteIcons()
public static java.lang.Object getDefaultTitleBackground()
public static void setDefaultTitleBackground(java.awt.Color color)
public static void setDefaultTitleBackground(Gradient gradient)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||