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

Quick Search    Search Deep

com.trapezium.chisel.gui
Class TitleBar  view TitleBar download TitleBar.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended bycom.trapezium.chisel.gui.ChiselAWTPane
              extended bycom.trapezium.chisel.gui.TitleBar
All Implemented Interfaces:
java.awt.event.ActionListener, DisplayConstants, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, com.trapezium.chisel.Workspace

public class TitleBar
extends ChiselAWTPane
implements java.awt.event.ActionListener

A title bar control for a movable window. The title bar displays a title, moves the window which owns it. By default it assumes its parent is the window to move, but any ancestor can be specified. The title bar can also contain up to three buttons (minimize, maximize and close) as specified in the style parameter. The default is a maximize and a close button.


Nested Class Summary
 
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
(package private)  boolean activated
           
(package private)  GlyphButton closeButton
           
static int CLOSEBUTTON
           
(package private)  GlyphButton maxButton
           
static int MAXBUTTON
           
(package private)  GlyphButton minButton
           
static int MINBUTTON
           
(package private)  int style
           
(package private)  java.lang.String title
           
 
Fields inherited from class com.trapezium.chisel.gui.ChiselAWTPane
 
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 com.trapezium.chisel.gui.DisplayConstants
BOTTOM_MARGIN, DEFAULT_ACTIVECOLOR, DEFAULT_BGCOLOR, DEFAULT_BORDERCOLOR, DEFAULT_CONTROLCOLOR, DEFAULT_DECAL, DEFAULT_FADEDTEXTCOLOR, DEFAULT_FRAMECOLOR, DEFAULT_GROOVECOLOR, DEFAULT_INACTIVECOLOR, DEFAULT_LITESHADOWCOLOR, DEFAULT_PANECOLOR, DEFAULT_POPUPCOLOR, DEFAULT_POPUPTEXTCOLOR, DEFAULT_PROGRESSBARCOLOR, DEFAULT_ROWHEADERCOLOR, DEFAULT_RULECOLOR, DEFAULT_SELECTEDCOLOR, DEFAULT_SELECTEDTEXTCOLOR, DEFAULT_SHADOWCOLOR, DEFAULT_STATUSBARCOLOR, DEFAULT_TABLECOLOR, DEFAULT_TEXTCOLOR, DEFAULT_TILE, DEFAULT_TILEX, DEFAULT_TILEY, DEFAULT_TITLETEXTCOLOR, DEFAULT_TOOLBARCOLOR, DEFAULT_TOOLTIPCOLOR, DEFAULT_TOPTABLECOLOR, DEFAULT_WORKSPACECOLOR, FRAMED_BORDER, HGAP, LEFT_MARGIN, LOWERED_BORDER, NO_BORDER, RAISED_BORDER, RIGHT_MARGIN, THICK_BORDER, THIN_BORDER, TOP_MARGIN, VGAP
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TitleBar(java.lang.String title)
           
TitleBar(java.lang.String title, int style)
           
TitleBar(java.lang.String title, int style, int ancestor)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          one of the window buttons fired
 void doLayout()
          Layout the components in this container.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of this container.
 java.lang.String getText()
           
 void paint(java.awt.Graphics g)
          Paints this container.
 void setActivated(boolean activated)
           
 void setText(java.lang.String text)
           
 
Methods inherited from class com.trapezium.chisel.gui.ChiselAWTPane
addImpl, close, copy, cut, getBorder, getInsets, getSelection, isOpaque, moveToBack, moveToFront, nextError, paintBackground, paste, prevError, redo, remove, setBorder, setBorder, setBounds, setOpaque, setSelection, undo
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusDownCycle, update, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, 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, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, 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

CLOSEBUTTON

public static final int CLOSEBUTTON
See Also:
Constant Field Values

MINBUTTON

public static final int MINBUTTON
See Also:
Constant Field Values

MAXBUTTON

public static final int MAXBUTTON
See Also:
Constant Field Values

title

java.lang.String title

style

int style

minButton

GlyphButton minButton

maxButton

GlyphButton maxButton

closeButton

GlyphButton closeButton

activated

boolean activated
Constructor Detail

TitleBar

public TitleBar(java.lang.String title)

TitleBar

public TitleBar(java.lang.String title,
                int style)

TitleBar

public TitleBar(java.lang.String title,
                int style,
                int ancestor)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
one of the window buttons fired

Specified by:
actionPerformed in interface java.awt.event.ActionListener

paint

public void paint(java.awt.Graphics g)
Description copied from class: java.awt.Container
Paints this container. The implementation of this method in this class forwards to any lightweight components in this container. If this method is subclassed, this method should still be invoked as a superclass method so that lightweight components are properly drawn.

Overrides:
paint in class ChiselAWTPane

doLayout

public void doLayout()
Description copied from class: java.awt.Container
Layout the components in this container.


getPreferredSize

public java.awt.Dimension getPreferredSize()
Description copied from class: java.awt.Container
Returns the preferred size of this container.


setText

public void setText(java.lang.String text)

getText

public java.lang.String getText()

setActivated

public void setActivated(boolean activated)