com.birosoft.liquid
Class LiquidInternalFrameTitlePane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.plaf.basic.BasicInternalFrameTitlePane
                  extended by com.birosoft.liquid.LiquidInternalFrameTitlePane
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.LayoutManager, java.awt.MenuContainer, java.io.Serializable

public class LiquidInternalFrameTitlePane
extends javax.swing.plaf.basic.BasicInternalFrameTitlePane
implements java.awt.LayoutManager

This class represents the title pane for the JInternalFrame components.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicInternalFrameTitlePane
javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction, javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction, javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction, javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction, javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler, javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction, javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction, javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar, javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout
 
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
protected  int frameTitleHeight
          The frame's title height, read from the UIDefaults table.
protected  boolean isPalette
           
protected  javax.swing.Icon paletteCloseIcon
           
protected  int paletteTitleHeight
           
 
Fields inherited from class javax.swing.plaf.basic.BasicInternalFrameTitlePane
CLOSE_CMD, closeAction, closeButton, closeIcon, frame, iconButton, iconIcon, ICONIFY_CMD, iconifyAction, maxButton, maxIcon, MAXIMIZE_CMD, maximizeAction, menuBar, minIcon, MOVE_CMD, moveAction, notSelectedTextColor, notSelectedTitleColor, propertyChangeListener, RESTORE_CMD, restoreAction, selectedTextColor, selectedTitleColor, SIZE_CMD, sizeAction, windowMenu
 
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
LiquidInternalFrameTitlePane(javax.swing.JInternalFrame frame)
          This constructor creates a title pane for the given internal frame instance.
 
Method Summary
 void activate()
           
 void addLayoutComponent(java.lang.String name, java.awt.Component c)
          Adds the specified component with the specified name to the layout.
protected  void addSubComponents()
           
protected  void createButtons()
          Creates the buttons of the title pane and initilizes their actions.
protected  java.awt.LayoutManager createLayout()
          Creates the layout manager for the title pane.
 void deactivate()
           
 java.awt.Font getFont()
           
 java.awt.Dimension getMinimumSize()
          The minimum size of the frame.
 java.awt.Dimension getPreferredSize(java.awt.Container c)
          Gets the preferred size of the given container.
protected  void installDefaults()
          Installs some default values.
 void layoutContainer(java.awt.Container c)
          Lays out the container in the specified panel.
 java.awt.Dimension minimumLayoutSize(java.awt.Container c)
          Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
 void paintComponent(java.awt.Graphics g)
          Paints this component.
 void paintPalette(java.awt.Graphics g)
          Paints the title pane for a palette.
protected  void paintTitleBackground(java.awt.Graphics g)
           
 java.awt.Dimension preferredLayoutSize(java.awt.Container c)
          Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
 void removeLayoutComponent(java.awt.Component c)
          Removes the specified component from the layout.
protected  void setButtonIcons()
           
 void setPalette(boolean b)
           
protected  void uninstallDefaults()
           
 
Methods inherited from class javax.swing.plaf.basic.BasicInternalFrameTitlePane
addSystemMenuItems, assembleSystemMenu, createActions, createPropertyChangeListener, createSystemMenu, createSystemMenuBar, enableActions, getTitle, installListeners, installTitlePane, postClosingEvent, showSystemMenu, uninstallListeners
 
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, getNextFocusableComponent, getPopupLocation, getPreferredSize, 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, paintBorder, 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, setFont, 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
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, 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, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isPalette

protected boolean isPalette

paletteCloseIcon

protected javax.swing.Icon paletteCloseIcon

paletteTitleHeight

protected int paletteTitleHeight

frameTitleHeight

protected int frameTitleHeight
The frame's title height, read from the UIDefaults table.

Constructor Detail

LiquidInternalFrameTitlePane

public LiquidInternalFrameTitlePane(javax.swing.JInternalFrame frame)
This constructor creates a title pane for the given internal frame instance.

Parameters:
frame - The internal frame that needs a title pane.
Method Detail

installDefaults

protected void installDefaults()
Installs some default values. Reads the internalframe title height from the ui defaults table.

Overrides:
installDefaults in class javax.swing.plaf.basic.BasicInternalFrameTitlePane

uninstallDefaults

protected void uninstallDefaults()
Overrides:
uninstallDefaults in class javax.swing.plaf.basic.BasicInternalFrameTitlePane

paintTitleBackground

protected void paintTitleBackground(java.awt.Graphics g)
Overrides:
paintTitleBackground in class javax.swing.plaf.basic.BasicInternalFrameTitlePane

paintComponent

public void paintComponent(java.awt.Graphics g)
Paints this component.

Overrides:
paintComponent in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
Parameters:
g - The graphics context to use.

createLayout

protected java.awt.LayoutManager createLayout()
Creates the layout manager for the title pane.

Overrides:
createLayout in class javax.swing.plaf.basic.BasicInternalFrameTitlePane
Returns:
The layout manager for the title pane.

addSubComponents

protected void addSubComponents()
Overrides:
addSubComponents in class javax.swing.plaf.basic.BasicInternalFrameTitlePane

setButtonIcons

protected void setButtonIcons()
Overrides:
setButtonIcons in class javax.swing.plaf.basic.BasicInternalFrameTitlePane

createButtons

protected void createButtons()
Creates the buttons of the title pane and initilizes their actions.

Overrides:
createButtons in class javax.swing.plaf.basic.BasicInternalFrameTitlePane

paintPalette

public void paintPalette(java.awt.Graphics g)
Paints the title pane for a palette.

Parameters:
g - The graphics context to use.

setPalette

public void setPalette(boolean b)

addLayoutComponent

public void addLayoutComponent(java.lang.String name,
                               java.awt.Component c)
Adds the specified component with the specified name to the layout.

Specified by:
addLayoutComponent in interface java.awt.LayoutManager
Parameters:
name - the component name
c - the component to be added

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component c)
Removes the specified component from the layout.

Specified by:
removeLayoutComponent in interface java.awt.LayoutManager
Parameters:
c - the component to be removed

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container c)
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.

Specified by:
preferredLayoutSize in interface java.awt.LayoutManager
Parameters:
c - the component to be laid out

getPreferredSize

public java.awt.Dimension getPreferredSize(java.awt.Container c)
Gets the preferred size of the given container.

Parameters:
c - The container to gets its preferred size.
Returns:
The preferred size of the given container.

getMinimumSize

public java.awt.Dimension getMinimumSize()
The minimum size of the frame. This is used, for example, during resizing to find the minimum allowable size. Providing at least some minimum size fixes a bug which breaks horizontal resizing. Note: the Motif plaf allows for a 0,0 min size, but we provide a reasonable minimum here. Future: calculate min size based upon contents.

Overrides:
getMinimumSize in class javax.swing.JComponent

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container c)
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.

Specified by:
minimumLayoutSize in interface java.awt.LayoutManager
Parameters:
c - the component to be laid out

layoutContainer

public void layoutContainer(java.awt.Container c)
Lays out the container in the specified panel.

Specified by:
layoutContainer in interface java.awt.LayoutManager
Parameters:
c - the component which needs to be laid out

activate

public void activate()

deactivate

public void deactivate()

getFont

public java.awt.Font getFont()
Specified by:
getFont in interface java.awt.MenuContainer
Overrides:
getFont in class java.awt.Component
See Also:
Component.getFont()