com.japisoft.framework.dockable
Class BasicInnerWindow

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--com.japisoft.framework.dockable.BasicInnerWindow
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, com.japisoft.framework.dockable.Windowable

public class BasicInnerWindow
extends javax.swing.JPanel
implements com.japisoft.framework.dockable.Windowable

This is an inner frame with a bar having a title and a set of actions. This class is rather for inner usage.

Version:
1.3
Author:
(c) 2004 JAPISoft / http://www.japisoft.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
BasicInnerWindow(InnerWindowProperties properties)
           
 
Method Summary
 void addNotify()
           
 void dispose()
           
 void fireDockEvent(java.lang.String id, int type)
           
 ActionModel getActionModel()
           
 javax.swing.JComponent getContentPane()
           
 java.awt.Rectangle getFrameBounds()
          If the inner window has been transformed inside a frame
 javax.swing.Icon getIcon()
           
 java.lang.String getId()
           
 JDock getJDock()
           
 java.lang.String getTitle()
           
 javax.swing.JComponent getUserView()
           
 javax.swing.JComponent getView()
           
 boolean isFixed()
           
 boolean isMaximized()
           
 void removeNotify()
           
 void repaint()
          Repaint the view
 void requestFocus()
          Reset the focus
 void setBackground(java.awt.Color color)
          Update the backgrond for this window
 void setContentPane(javax.swing.JComponent component)
          Reset the final content
 void setFixed(boolean fixed)
          Fixed a window, so it cannot be swapped with another window
 void setForeground(java.awt.Color color)
          Update the foreground for this window
 void setFrameBounds(java.awt.Rectangle r)
          Last location and size when the inner window has been transformed inside a frame
 void setIcon(javax.swing.Icon icon)
          Reset for a new icon
 void setMaximized(boolean max)
          Maximized state
 void setTitle(java.lang.String title)
          Reset for a new title
 java.lang.String toString()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicInnerWindow

public BasicInnerWindow(InnerWindowProperties properties)
Method Detail

requestFocus

public void requestFocus()
Description copied from interface: com.japisoft.framework.dockable.Windowable
Reset the focus

Specified by:
requestFocus in interface com.japisoft.framework.dockable.Windowable
Overrides:
requestFocus in class javax.swing.JComponent

addNotify

public void addNotify()
Overrides:
addNotify in class javax.swing.JComponent

toString

public java.lang.String toString()
Overrides:
toString in class java.awt.Component

removeNotify

public void removeNotify()
Overrides:
removeNotify in class javax.swing.JComponent

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface com.japisoft.framework.dockable.Windowable
Returns:
the current title

getId

public java.lang.String getId()
Specified by:
getId in interface com.japisoft.framework.dockable.Windowable
Returns:
the id of the component

getUserView

public javax.swing.JComponent getUserView()
Specified by:
getUserView in interface com.japisoft.framework.dockable.Windowable
Returns:
the real UI component

getView

public javax.swing.JComponent getView()
Specified by:
getView in interface com.japisoft.framework.dockable.Windowable
Returns:
the global component

dispose

public void dispose()

setTitle

public void setTitle(java.lang.String title)
Description copied from interface: com.japisoft.framework.dockable.Windowable
Reset for a new title

Specified by:
setTitle in interface com.japisoft.framework.dockable.Windowable

getIcon

public javax.swing.Icon getIcon()
Specified by:
getIcon in interface com.japisoft.framework.dockable.Windowable
Returns:
the current icon

setIcon

public void setIcon(javax.swing.Icon icon)
Description copied from interface: com.japisoft.framework.dockable.Windowable
Reset for a new icon

Specified by:
setIcon in interface com.japisoft.framework.dockable.Windowable

setBackground

public void setBackground(java.awt.Color color)
Description copied from interface: com.japisoft.framework.dockable.Windowable
Update the backgrond for this window

Specified by:
setBackground in interface com.japisoft.framework.dockable.Windowable
Overrides:
setBackground in class javax.swing.JComponent

setForeground

public void setForeground(java.awt.Color color)
Description copied from interface: com.japisoft.framework.dockable.Windowable
Update the foreground for this window

Specified by:
setForeground in interface com.japisoft.framework.dockable.Windowable
Overrides:
setForeground in class javax.swing.JComponent

getFrameBounds

public java.awt.Rectangle getFrameBounds()
Description copied from interface: com.japisoft.framework.dockable.Windowable
If the inner window has been transformed inside a frame

Specified by:
getFrameBounds in interface com.japisoft.framework.dockable.Windowable

setFrameBounds

public void setFrameBounds(java.awt.Rectangle r)
Description copied from interface: com.japisoft.framework.dockable.Windowable
Last location and size when the inner window has been transformed inside a frame

Specified by:
setFrameBounds in interface com.japisoft.framework.dockable.Windowable

getContentPane

public javax.swing.JComponent getContentPane()
Specified by:
getContentPane in interface com.japisoft.framework.dockable.Windowable
Returns:
the container with the user UI panel

setContentPane

public void setContentPane(javax.swing.JComponent component)
Description copied from interface: com.japisoft.framework.dockable.Windowable
Reset the final content

Specified by:
setContentPane in interface com.japisoft.framework.dockable.Windowable

setFixed

public void setFixed(boolean fixed)
Description copied from interface: com.japisoft.framework.dockable.Windowable
Fixed a window, so it cannot be swapped with another window

Specified by:
setFixed in interface com.japisoft.framework.dockable.Windowable

isFixed

public boolean isFixed()
Specified by:
isFixed in interface com.japisoft.framework.dockable.Windowable
Returns:
true if the window cannot be swapped with another window

isMaximized

public boolean isMaximized()
Specified by:
isMaximized in interface com.japisoft.framework.dockable.Windowable
Returns:
the maximized state

setMaximized

public void setMaximized(boolean max)
Description copied from interface: com.japisoft.framework.dockable.Windowable
Maximized state

Specified by:
setMaximized in interface com.japisoft.framework.dockable.Windowable

getActionModel

public ActionModel getActionModel()
Specified by:
getActionModel in interface com.japisoft.framework.dockable.Windowable
Returns:
a model for user actions. If empty this is filled with common actions from the CommonActionManager

getJDock

public JDock getJDock()

fireDockEvent

public void fireDockEvent(java.lang.String id,
                          int type)
Specified by:
fireDockEvent in interface com.japisoft.framework.dockable.Windowable

repaint

public void repaint()
Repaint the view