Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.memoire.bu
Class BuDesktop  view BuDesktop download BuDesktop.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JLayeredPane
                  extended byjavax.swing.JDesktopPane
                      extended bycom.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 Class Summary
private  class BuDesktop.Layout
           
 
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
 
Field Summary
static int BLOCK_LAYER
           
private  boolean blocked_
           
private static javax.swing.border.Border BORDER
           
private  BuBackgroundPainter bp_
           
static int LEFT_MARGIN
           
private  javax.swing.Icon logo_
           
protected  BuPopupMenu menu_
           
private  boolean tabbed_
           
 
Fields inherited from class javax.swing.JDesktopPane
LIVE_DRAG_MODE, OUTLINE_DRAG_MODE
 
Fields inherited from class javax.swing.JLayeredPane
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER
 
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.Container
 
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
BuDesktop()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent _evt)
          This method is invoked when an action occurs.
 void activateInternalFrame(javax.swing.JInternalFrame _f)
           
protected  void addImpl(java.awt.Component _c, java.lang.Object _constraints, int _index)
          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).
 void addInternalFrame(javax.swing.JInternalFrame _f)
           
 void adjustSize()
           
 void arrangeIcons()
           
protected  void arrangeIcons0()
           
 void arrangePalettes()
           
 void checkInternalFrame(javax.swing.JInternalFrame _f)
           
protected  javax.swing.DesktopManager createDesktopManager()
           
protected  BuPopupMenu createPopupMenu()
           
 void deactivateInternalFrame(javax.swing.JInternalFrame _f)
           
 BuBackgroundPainter getBackgroundPainter()
           
 javax.swing.JInternalFrame getCurrentInternalFrame()
           
 javax.swing.JInternalFrame[] getIconifiedFrames()
           
 int getIconifiedFramesCount()
           
 javax.swing.Icon getLogo()
           
 javax.swing.JInternalFrame[] getNormalFrames()
           
 int getNormalFramesCount()
           
 javax.swing.JInternalFrame[] getNotIconifiedFrames()
           
 int getNotIconifiedFramesCount()
           
 javax.swing.JInternalFrame[] getPalettes()
           
 int getPalettesCount()
           
 java.awt.Dimension getPreferredSize()
          Get the component's preferred size.
 java.awt.Point getToolTipLocation(java.awt.event.MouseEvent _evt)
          Return the location at which the JComponent.toolTipText>JComponent.toolTipText 55 property should be displayed, when triggered by a particular mouse event.
 java.lang.String getToolTipText()
          Get the value of the JComponent.toolTipText>JComponent.toolTipText 55 property.
 java.lang.String getToolTipText(java.awt.event.MouseEvent _evt)
          Get the value of the JComponent.toolTipText>JComponent.toolTipText 55 property, in response to a particular mouse event.
 boolean isBlocked()
           
 boolean isFocusCycleRoot()
          Check whether this Container is a focus cycle root.
 boolean isOpaque()
          This method always returns true to indicate that it is not transparent.
 boolean isPalette(javax.swing.JComponent _f)
           
 boolean isTabbed()
           
 void mouseClicked(java.awt.event.MouseEvent _evt)
          This method is called when the mouse is clicked (pressed and released in short succession) on a component.
 void mouseDown(java.awt.event.MouseEvent _evt)
           
 void mouseEntered(java.awt.event.MouseEvent _evt)
          This method is called when the mouse enters a component.
 void mouseExited(java.awt.event.MouseEvent _evt)
          This method is called when the mouse exits a component.
 void mousePressed(java.awt.event.MouseEvent _evt)
          This method is called when the mouse is pressed over a component.
 void mouseReleased(java.awt.event.MouseEvent _evt)
          This method is called when the mouse is released over a component.
 void mouseUp(java.awt.event.MouseEvent _evt)
           
 void paint(java.awt.Graphics _g)
          This method is overridden order to provide a reasonable painting mechanism for JLayeredPane.
 void paintChildren(java.awt.Graphics _g)
          Paint the component's children.
 void paintComponent(java.awt.Graphics _g)
          Paint the component's body.
 void popupMenu(java.awt.event.MouseEvent _evt)
           
 void remove(int _index)
          Removes a child from this container.
 void removeInternalFrame(javax.swing.JInternalFrame _f)
           
 void reshape(int _x, int _y, int _w, int _h)
          Moves and resizes the component.
 void setBackgroundPainter(BuBackgroundPainter _bp)
           
 void setLogo(javax.swing.Icon _logo)
           
 void showFrame(javax.swing.JInternalFrame _f)
           
 void snapWH(javax.swing.JComponent _f)
           
 void snapXY(javax.swing.JComponent _f)
           
protected  void sortFramesByHeight(javax.swing.JInternalFrame[] _frames)
           
protected  void sortFramesByTitle(javax.swing.JInternalFrame[] _frames)
           
protected  void sortFramesByWidth(javax.swing.JInternalFrame[] _frames)
           
 void tile()
           
 void updateUI()
          This method restores the UI used with the JDesktopPane to the default.
 void waterfall()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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_
Constructor Detail

BuDesktop

public BuDesktop()
Method Detail

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.