dog.gui
Class DFrameset

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--dog.gui.DContainer
                    |
                    +--dog.gui.DFrameset
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, Referential, java.io.Serializable

public class DFrameset
extends DContainer

A container used to lay out components similarly to an HTML frameset.

When you add a component to the frameset, you can specify a String constraint representing the desired width or height (depending on whether the Frameset's orientation is horizontal or vertical) of the component. If the number is followed by a '%' (percent sign), the frameset will calculate the component's width/height as that percentage of its own width/height.

You can specify that the user can resize the components within the frameset manually by dragging the mouse over the boundaries between the components.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
protected  boolean allowUserResize
          Whether or not to allow the frameset to be resized by the user.
protected  java.util.Hashtable dimensions
          The hashtable used to store the dimensions represented by the contained components.
protected  boolean dimpled
          Whether to draw a NeXT-like dimple on the borders between components when user-resizeable.
protected  int gap
          The gap between the components.
static int HORIZONTAL
          The horizontal orientation.
protected  int orientation
          The orientation of the frameset.
protected  java.util.Hashtable percentages
          The hashtable used to store the percentages represented by the contained components.
static int VERTICAL
          The vertical orientation.
 
Fields inherited from class dog.gui.DContainer
cancelButton, CENTER, defaultButton, EAST, NORTH, NORTHEAST, NORTHWEST, reference, SOUTH, SOUTHEAST, SOUTHWEST, tooltip, WEST
 
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
DFrameset()
          Constructs a horizontally-oriented frameset.
DFrameset(int orientation)
          Constructs a frameset with the specified orientation.
DFrameset(int orientation, boolean allowUserResize)
          Constructs a frameset with the specified orientation, indicating whether the user can resize it.
 
Method Summary
protected  void addImpl(java.awt.Component component, java.lang.Object constraints, int index)
          Adds a component to the frameset.
 void doLayout()
          Lays out this group.
 java.awt.Dimension getMinimumSize()
          Returns the minimum size of this frameset.
 int getOrientation()
          Returns this frameset's orientation.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of this frameset.
 boolean isAllowUserResize()
          Indicates whether this frameset can be resized by the user with the mouse.
 boolean isDimpled()
          Indicates whether to draw a dimple on the borders between components when the scrollbar is user-resizeable.
 void paint(java.awt.Graphics g)
           
protected  void processMouseEvent(java.awt.event.MouseEvent event)
          Process mouse events.
protected  void processMouseMotionEvent(java.awt.event.MouseEvent event)
          Process mouse motion events.
 void setAllowUserResize(boolean flag)
          Sets whether this frameset can be resized by the user with the mouse.
 void setDimpled(boolean flag)
          Sets whether to draw a dimple on the borders between components when the scrollbar is user-resizeable.
 void setOrientation(int orientation)
          Sets this frameset's orientation.
 
Methods inherited from class dog.gui.DContainer
addPropertyChangeListener, alignParamString, drawActiveButtonBorder, drawActiveOptionBorder, drawArrow, drawBorder, drawButtonBorder, drawCheckbox, drawDarkBorder, drawDefaultButtonBorder, drawDisabledBorder, drawDisabledCheckbox, drawDisabledOption, drawExpander, drawFocusBorder, drawImage, drawLabel, drawOption, drawOptionBorder, drawPressedBorder, getCancelButton, getComponent, getDefaultButton, getDefaultToolkit, getImage, getImage, getImage, getReference, getRootPane, getTooltip, isPreloadImages, paramString, processCancelAction, processDefaultAction, processEvent, removePropertyChangeListener, setCancelButton, setDefaultButton, setEnabled, setPreloadImages, setReference, setTooltip, toString
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addNotify, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HORIZONTAL

public static final int HORIZONTAL
The horizontal orientation.

VERTICAL

public static final int VERTICAL
The vertical orientation.

orientation

protected int orientation
The orientation of the frameset.

allowUserResize

protected boolean allowUserResize
Whether or not to allow the frameset to be resized by the user.

gap

protected int gap
The gap between the components.

percentages

protected java.util.Hashtable percentages
The hashtable used to store the percentages represented by the contained components.

dimensions

protected java.util.Hashtable dimensions
The hashtable used to store the dimensions represented by the contained components.

dimpled

protected boolean dimpled
Whether to draw a NeXT-like dimple on the borders between components when user-resizeable.
Constructor Detail

DFrameset

public DFrameset()
Constructs a horizontally-oriented frameset.

DFrameset

public DFrameset(int orientation)
Constructs a frameset with the specified orientation.
Parameters:
orientation - the orientation (HORIZONTAL or VERTICAL)

DFrameset

public DFrameset(int orientation,
                 boolean allowUserResize)
Constructs a frameset with the specified orientation, indicating whether the user can resize it.
Parameters:
orientation - the orientation (HORIZONTAL or VERTICAL)
allowUserResize - whether this frameset can be resized by the user with the mouse
Method Detail

getOrientation

public int getOrientation()
Returns this frameset's orientation.
See Also:
setOrientation(int)

setOrientation

public void setOrientation(int orientation)
Sets this frameset's orientation.
Parameters:
orientation - HORIZONTAL or VERTICAL
See Also:
getOrientation()

isAllowUserResize

public boolean isAllowUserResize()
Indicates whether this frameset can be resized by the user with the mouse.
See Also:
setAllowUserResize(boolean)

setAllowUserResize

public void setAllowUserResize(boolean flag)
Sets whether this frameset can be resized by the user with the mouse.
See Also:
isAllowUserResize()

isDimpled

public boolean isDimpled()
Indicates whether to draw a dimple on the borders between components when the scrollbar is user-resizeable.

setDimpled

public void setDimpled(boolean flag)
Sets whether to draw a dimple on the borders between components when the scrollbar is user-resizeable.
Parameters:
flag - true if the dimple is to be drawn

addImpl

protected void addImpl(java.awt.Component component,
                       java.lang.Object constraints,
                       int index)
Adds a component to the frameset.
Overrides:
addImpl in class DContainer

getMinimumSize

public java.awt.Dimension getMinimumSize()
Returns the minimum size of this frameset.
Overrides:
getMinimumSize in class java.awt.Container

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferred size of this frameset.
Overrides:
getPreferredSize in class java.awt.Container

doLayout

public void doLayout()
Lays out this group.
Overrides:
doLayout in class java.awt.Container

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Container

processMouseEvent

protected void processMouseEvent(java.awt.event.MouseEvent event)
Process mouse events.
Overrides:
processMouseEvent in class DContainer

processMouseMotionEvent

protected void processMouseMotionEvent(java.awt.event.MouseEvent event)
Process mouse motion events.
Overrides:
processMouseMotionEvent in class DContainer