artofillusion.ui
Class ComponentsDialog

java.lang.Object
  extended by buoy.event.EventSource
      extended by buoy.widget.Widget
          extended by buoy.widget.WidgetContainer
              extended by buoy.widget.WindowWidget
                  extended by buoy.widget.BDialog
                      extended by artofillusion.ui.ComponentsDialog

public class ComponentsDialog
extends buoy.widget.BDialog

A ComponentsDialog is a modal dialog containing a line of text, and one or more Widgets for the user to edit. Each Widget has a label next to it. At the bottom are two buttons labeled OK and Cancel.


Constructor Summary
ComponentsDialog(buoy.widget.WindowWidget parent, java.lang.String prompt, buoy.widget.Widget[] components, java.lang.String[] labels)
          Create a modal dialog containing a set of labeled components.
ComponentsDialog(buoy.widget.WindowWidget parent, java.lang.String prompt, buoy.widget.Widget[] components, java.lang.String[] labels, java.lang.Runnable onOK, java.lang.Runnable onCancel)
          Create a non-modal dialog containing a set of labeled components.
 
Method Summary
 boolean clickedOk()
          Return true if the user clicked OK, false if they clicked Cancel.
 void setOkEnabled(boolean enabled)
          Set whether the OK button is enabled.
 
Methods inherited from class buoy.widget.BDialog
getChildCount, getChildren, getComponent, getMenuBar, getTitle, isModal, isResizable, pack, remove, removeAll, setMenuBar, setModal, setResizable, setTitle
 
Methods inherited from class buoy.widget.WindowWidget
dispose, getContent, getDefaultButton, isVisible, layoutChildren, setBounds, setContent, setDefaultButton, setVisible, toBack, toFront
 
Methods inherited from class buoy.widget.WidgetContainer
isOpaque, setOpaque
 
Methods inherited from class buoy.widget.Widget
addEventLink, dispatchEvent, getBackground, getBounds, getCursor, getFont, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, hasFocus, isEnabled, isFocusable, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName
 
Methods inherited from class buoy.event.EventSource
addEventLink, addEventLink, removeEventLink
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentsDialog

public ComponentsDialog(buoy.widget.WindowWidget parent,
                        java.lang.String prompt,
                        buoy.widget.Widget[] components,
                        java.lang.String[] labels)
Create a modal dialog containing a set of labeled components.

Parameters:
parent - the parent of the dialog
prompt - a text string to appear at the top of the dialog
components - the list of components to display
labels - the list of labels for each component

ComponentsDialog

public ComponentsDialog(buoy.widget.WindowWidget parent,
                        java.lang.String prompt,
                        buoy.widget.Widget[] components,
                        java.lang.String[] labels,
                        java.lang.Runnable onOK,
                        java.lang.Runnable onCancel)
Create a non-modal dialog containing a set of labeled components.

Parameters:
parent - the parent of the dialog
prompt - a text string to appear at the top of the dialog
components - the list of components to display
labels - the list of labels for each component
onOK - a callback to execute when the user clicks OK
onCancel - a callback to execute when the user clicks Cancel
Method Detail

clickedOk

public boolean clickedOk()
Return true if the user clicked OK, false if they clicked Cancel.


setOkEnabled

public void setOkEnabled(boolean enabled)
Set whether the OK button is enabled.



Copyright © 1999-2008 by Peter Eastman.