java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLayeredPane
javax.swing.JDesktopPane
com.memoire.bu.BuDesktop
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.io.Serializable
- public class BuDesktop
- extends javax.swing.JDesktopPane
- implements java.awt.event.MouseListener, java.awt.event.ActionListener
A DesktopPane with a few additional services.
Auto-resizing, optionnaly tabbed, custom-friendly, icons management, ...
| Nested classes inherited from class javax.swing.JDesktopPane |
javax.swing.JDesktopPane.AccessibleJDesktopPane |
| Nested classes inherited from class javax.swing.JLayeredPane |
javax.swing.JLayeredPane.AccessibleJLayeredPane |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class java.awt.Container |
|
| Methods inherited from class javax.swing.JDesktopPane |
getAccessibleContext, getAllFrames, getAllFramesInLayer, getDesktopManager, getDragMode, getSelectedFrame, getUI, getUIClassID, paramString, setDesktopManager, setDragMode, setSelectedFrame, setUI |
| Methods inherited from class javax.swing.JLayeredPane |
getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, putLayer, removeAll, setLayer, setLayer, setPosition |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, 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, 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, processMouseEvent, 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, transferFocusBackward, transferFocusUpCycle |
LEFT_MARGIN
public static final int LEFT_MARGIN
- See Also:
- Constant Field Values
BLOCK_LAYER
public static int BLOCK_LAYER
BORDER
private static final javax.swing.border.Border BORDER
tabbed_
private boolean tabbed_
blocked_
private boolean blocked_
logo_
private javax.swing.Icon logo_
bp_
private BuBackgroundPainter bp_
menu_
protected BuPopupMenu menu_
BuDesktop
public BuDesktop()
isPalette
public final boolean isPalette(javax.swing.JComponent _f)
paint
public void paint(java.awt.Graphics _g)
- Description copied from class:
javax.swing.JLayeredPane
- This method is overridden order to provide a reasonable painting
mechanism for
JLayeredPane. This is necessary since
JLayeredPane's do not have an own UI delegate.
Basically this method clears the background for the
JLayeredPane and then calls super.paint(g).
snapXY
public final void snapXY(javax.swing.JComponent _f)
snapWH
public final void snapWH(javax.swing.JComponent _f)
createDesktopManager
protected javax.swing.DesktopManager createDesktopManager()
isFocusCycleRoot
public boolean isFocusCycleRoot()
- Description copied from class:
java.awt.Container
- Check whether this Container is a focus cycle root.
isOpaque
public boolean isOpaque()
- Description copied from class:
javax.swing.JDesktopPane
- This method always returns true to indicate that it is not transparent.
addImpl
protected void addImpl(java.awt.Component _c,
java.lang.Object _constraints,
int _index)
- Description copied from class:
javax.swing.JLayeredPane
- Overrides the default implementation from java.awt.Container
such that
layerConstraint is interpreted as an java.lang.Integer, specifying the layer to which the component will be added
(at the bottom position).
The argument index specifies the position within the layer
at which the component should be added, where 0 is the top
position greater values specify positions below that and -1
specifies the bottom position.
remove
public void remove(int _index)
- Description copied from class:
javax.swing.JLayeredPane
- Removes a child from this container. The child is specified by
index. After removal, the child no longer occupies a layer.
paintComponent
public void paintComponent(java.awt.Graphics _g)
- Description copied from class:
javax.swing.JComponent
- Paint the component's body. This usually means calling ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)>
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) 55 on the JComponent.ui>JComponent.ui 55 property of the component, if
it is non-null. You may override this if you wish to
customize the component's body-painting behavior. The component's body
is painted first, before the border and children.
paintChildren
public void paintChildren(java.awt.Graphics _g)
- Description copied from class:
javax.swing.JComponent
- Paint the component's children. This usually means calling Container.paint(java.awt.Graphics)>
Container.paint(java.awt.Graphics) 55 , which recursively calls JComponent.paint(java.awt.Graphics)>JComponent.paint(java.awt.Graphics) 55 on any of the
component's children, with appropriate changes to coordinate space and
clipping region. You may override this if you wish to customize
children painting behavior. The children are painted after the
component's body and border.
getToolTipText
public java.lang.String getToolTipText()
- Description copied from class:
javax.swing.JComponent
- Get the value of the JComponent.toolTipText>
JComponent.toolTipText 55 property.
getToolTipText
public java.lang.String getToolTipText(java.awt.event.MouseEvent _evt)
- Description copied from class:
javax.swing.JComponent
- Get the value of the JComponent.toolTipText>
JComponent.toolTipText 55 property, in response to a
particular mouse event.
getToolTipLocation
public java.awt.Point getToolTipLocation(java.awt.event.MouseEvent _evt)
- Description copied from class:
javax.swing.JComponent
- Return the location at which the JComponent.toolTipText>
JComponent.toolTipText 55 property should be
displayed, when triggered by a particular mouse event.
isTabbed
public boolean isTabbed()
isBlocked
public boolean isBlocked()
getLogo
public javax.swing.Icon getLogo()
setLogo
public void setLogo(javax.swing.Icon _logo)
getBackgroundPainter
public BuBackgroundPainter getBackgroundPainter()
setBackgroundPainter
public void setBackgroundPainter(BuBackgroundPainter _bp)
addInternalFrame
public void addInternalFrame(javax.swing.JInternalFrame _f)
removeInternalFrame
public void removeInternalFrame(javax.swing.JInternalFrame _f)
checkInternalFrame
public void checkInternalFrame(javax.swing.JInternalFrame _f)
activateInternalFrame
public void activateInternalFrame(javax.swing.JInternalFrame _f)
deactivateInternalFrame
public void deactivateInternalFrame(javax.swing.JInternalFrame _f)
getCurrentInternalFrame
public javax.swing.JInternalFrame getCurrentInternalFrame()
getNormalFrames
public javax.swing.JInternalFrame[] getNormalFrames()
getNotIconifiedFrames
public javax.swing.JInternalFrame[] getNotIconifiedFrames()
getIconifiedFrames
public javax.swing.JInternalFrame[] getIconifiedFrames()
getPalettes
public javax.swing.JInternalFrame[] getPalettes()
getNormalFramesCount
public int getNormalFramesCount()
getNotIconifiedFramesCount
public int getNotIconifiedFramesCount()
getIconifiedFramesCount
public int getIconifiedFramesCount()
getPalettesCount
public int getPalettesCount()
sortFramesByTitle
protected void sortFramesByTitle(javax.swing.JInternalFrame[] _frames)
sortFramesByHeight
protected void sortFramesByHeight(javax.swing.JInternalFrame[] _frames)
sortFramesByWidth
protected void sortFramesByWidth(javax.swing.JInternalFrame[] _frames)
waterfall
public void waterfall()
tile
public void tile()
arrangeIcons
public void arrangeIcons()
arrangeIcons0
protected final void arrangeIcons0()
arrangePalettes
public void arrangePalettes()
getPreferredSize
public java.awt.Dimension getPreferredSize()
- Description copied from class:
javax.swing.JComponent
- Get the component's preferred size. If the JComponent.preferredSize>
JComponent.preferredSize 55
property has been explicitly set, it is returned. If the JComponent.preferredSize>JComponent.preferredSize 55 property has not been set but the JComponent.ui>JComponent.ui 55 property
has been, the result of ComponentUI.getPreferredSize(javax.swing.JComponent)>ComponentUI.getPreferredSize(javax.swing.JComponent) 55 is
returned. If neither property has been set, the result of Container.getPreferredSize()>Container.getPreferredSize() 55 is returned.
reshape
public void reshape(int _x,
int _y,
int _w,
int _h)
- Description copied from class:
javax.swing.JComponent
- Moves and resizes the component.
adjustSize
public void adjustSize()
showFrame
public void showFrame(javax.swing.JInternalFrame _f)
mouseDown
public void mouseDown(java.awt.event.MouseEvent _evt)
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent _evt)
- Description copied from interface:
java.awt.event.MouseListener
- This method is called when the mouse enters a component.
- Specified by:
mouseEntered in interface java.awt.event.MouseListener
mouseExited
public void mouseExited(java.awt.event.MouseEvent _evt)
- Description copied from interface:
java.awt.event.MouseListener
- This method is called when the mouse exits a component.
- Specified by:
mouseExited in interface java.awt.event.MouseListener
mousePressed
public void mousePressed(java.awt.event.MouseEvent _evt)
- Description copied from interface:
java.awt.event.MouseListener
- This method is called when the mouse is pressed over a component.
- Specified by:
mousePressed in interface java.awt.event.MouseListener
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent _evt)
- Description copied from interface:
java.awt.event.MouseListener
- This method is called when the mouse is released over a component.
- Specified by:
mouseReleased in interface java.awt.event.MouseListener
mouseUp
public void mouseUp(java.awt.event.MouseEvent _evt)
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent _evt)
- Description copied from interface:
java.awt.event.MouseListener
- This method is called when the mouse is clicked (pressed and released
in short succession) on a component.
- Specified by:
mouseClicked in interface java.awt.event.MouseListener
createPopupMenu
protected BuPopupMenu createPopupMenu()
popupMenu
public void popupMenu(java.awt.event.MouseEvent _evt)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent _evt)
- Description copied from interface:
java.awt.event.ActionListener
- This method is invoked when an action occurs.
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
updateUI
public void updateUI()
- Description copied from class:
javax.swing.JDesktopPane
- This method restores the UI used with the JDesktopPane to the default.