marimba.gui
Class ContainerWidget

java.lang.Object
  |
  +--marimba.gui.Widget
        |
        +--marimba.gui.ContainerWidget
All Implemented Interfaces:
java.awt.image.ImageObserver, PropertyObject, TimerClient, WidgetConstants
Direct Known Subclasses:
FolderWidget, GroupBoxWidget, GroupWidget, ScrollingContainerWidget, ToolbarWidget, WindowWidget

public class ContainerWidget
extends Widget

Container widget. All widgets are containers, but this widget has a getContent() field that returns the actual container that contains the child widgets. The content can be practically any widget.

Version:
1.18, 12/17/97
Author:
Arthur van Hoff

Field Summary
 Widget content
           
 
Fields inherited from class marimba.gui.Widget
adapter, background, clazz, defaultBackground, defaultFont, defaultForeground, defaultHilite, directGraphics, disabled, east, editor, focus, font, foreground, height, hilite, layoutMgr, name, north, nwidgets, parent, script, south, tip, transparent, tx, ty, valid, visible, wBackground, west, wFont, wForeground, wHilite, widgets, width, wScript, wTip, x, y
 
Fields inherited from interface marimba.gui.WidgetConstants
ALWAYS, ANYWHERE, APPLET, ASCENDING, BLINK, BLUE, BONGO_EVENT, BOTH, BOTTOM, BOXED, BUTTON, CENTER, CHAR, CHECK, COLLAPSE_EVENT, CONTENT, DESCENDING, DETACHED, DIAGONAL, DOWN, DRAG, EXCLUSIVE, EXPAND_EVENT, FILL, FILLED, GREEN, HORIZONTAL, INSIDE, INVISIBLE, JAVA_VERSION, JAVAOS, JDK10, JDK11, LAYERS, LEFT, LOWERED, MAC, MULTIPLE, NETCASTER, NETSCAPE, NEVER, NONE, NT, OPTIONAL, OS_ARCH, OS_NAME, OS_VERSION, OUTLINE, PAGE_DOWN, PAGE_EVENT, PAGE_UP, PATTERN, PC, PICTURE, PLAIN, PROPORTIONAL, RADIO, RAISED, RED, REST_EVENT, RIGHT, ROUNDED, SCALE, SCROLLBAR, SCROLLING, SOLID, SQUARE, TEXT_CHANGED_EVENT, TOP, TOPLEFT, TRUNCATE, UNDERLINE, UNIX, UP, VERTICAL, WAKE_EVENT, WIN95, WINDOWS, WORD
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ContainerWidget()
          Create the container, and create the content area if necessary.
 
Method Summary
protected  void findInFocus(boolean forward)
          Assign the focus to the previous or next widget in this container.
 Widget findWidget(java.lang.String name)
          Find the widget in the content.
 void firstInFocus()
          Assign the focus to the first widget within this container.
 void getChildProperties(PropertyList list)
          Don't save the children of this container if the container has a content area.
 Widget getContent()
          Get the container that holds the child widgets.
 java.awt.Dimension getPreferredSize()
          Get the preferred size of containers.
 void layout()
          Default layout algorithm simply fits the content area to the entire container.
protected  Widget newContent()
          Create the content for this container.
 void nextInFocus()
          Assign the focus to the next widget that is located in this container and to the right or below the current focus.
 void previousInFocus()
          Assign the focus to the previous widget that is located within this container and to the left or above the current focus.
 void setProperties(PropertyList list)
          Set the properties.
 
Methods inherited from class marimba.gui.Widget
action, action, add, add, adjustFont, adjustFont, applyProperties, audioLoop, audioLoop, audioPlay, audioPlay, audioStop, audioStop, bounds, clearFocus, clearPopups, clone, contains, contains, createImage, createImage, currentFocus, destroy, disable, disable, enable, firstFocus, focusInterest, getAudioClip, getAudioClipAt, getBackground, getBounds, getCancelButton, getCursor, getDefaultButton, getDescription, getEditor, getEncoding, getFocusColor, getFont, getFontMetrics, getForeground, getHilite, getImage, getKey, getKey, getKey, getLayoutMgr, getLocale, getLocation, getName, getParent, getPlayerFrame, getPlayerPanel, getPresentation, getProperties, getSelBackground, getSelFocusColor, getSelForeground, getSize, getText, getText, getTip, getTip, getTipFont, getValue, getValue, getWidget, getWidgetAt, getWidgetAt, getWidgetClass, getWidgetsAt, getWidgetsAt, getWidgetsAt, gotFocus, gotoPage, gotoPage, handleEvent, hasFocus, hide, imageUpdate, inheritFont, init, inside, inside, invalidate, isDisabled, isShowing, isTransparent, isVisible, keyDown, keyUp, list, list, locateWidget, locateWidgets, locateWidgets, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, overlap, paint, paint, paintAll, paramString, postEvent, previousFocus, remove, remove, remove, removeAll, repaint, repaint, repaint, repaint, repaintParent, replace, replace, replace, requestFocus, resetCursor, reshape, reshape, resize, resize, rmove, rscroll, scroll, setAttach, setBackground, setBounds, setBounds, setCursor, setDisabled, setEditor, setEncoding, setFont, setForeground, setHilite, setLayoutMgr, setLocale, setLocation, setName, setSize, setSize, setText, setText, setTip, setTipFont, setTransparent, setValue, setValue, setVisible, show, show, size, start, stop, sync, tick, toBack, toBack, toFront, toFront, toString, update, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

content

public Widget content
Constructor Detail

ContainerWidget

public ContainerWidget()
Create the container, and create the content area if necessary.
Method Detail

getChildProperties

public void getChildProperties(PropertyList list)
Don't save the children of this container if the container has a content area.
Overrides:
getChildProperties in class Widget

setProperties

public void setProperties(PropertyList list)
Set the properties.
Overrides:
setProperties in class Widget
Following copied from class: marimba.gui.Widget
Parameters:
list - The list that contains the new widget state.
See Also:
Widget.getProperties(PropertyList)

getPreferredSize

public java.awt.Dimension getPreferredSize()
Get the preferred size of containers.
Overrides:
getPreferredSize in class Widget

getContent

public Widget getContent()
Get the container that holds the child widgets.

newContent

protected Widget newContent()
Create the content for this container. This method must be subclassed if the container has a content area.

layout

public void layout()
Default layout algorithm simply fits the content area to the entire container.
Overrides:
layout in class Widget

firstInFocus

public void firstInFocus()
Assign the focus to the first widget within this container.

nextInFocus

public void nextInFocus()
Assign the focus to the next widget that is located in this container and to the right or below the current focus.

previousInFocus

public void previousInFocus()
Assign the focus to the previous widget that is located within this container and to the left or above the current focus.

findInFocus

protected void findInFocus(boolean forward)
Assign the focus to the previous or next widget in this container.

findWidget

public Widget findWidget(java.lang.String name)
Find the widget in the content.
Overrides:
findWidget in class Widget
Following copied from class: marimba.gui.Widget
Parameters:
nm - the (case sensitive) name of the widget
See Also:
Widget.getWidget(java.lang.String)