# EditorDialogUtil (vilya 1.3 API)
Date: 2011-04-06

## com.threerings.stage.tools.editor.util
Class EditorDialogUtil

    java.lang.Object
      com.threerings.stage.tools.editor.util.EditorDialogUtil

    public class EditorDialogUtil

extends Object

Constructor Summary
`EditorDialogUtil()`

Method Summary
`static void` `addButton(ActionListener l, Container container, String name, String cmd)` Add a button to a container with the given parameters and action listener.
`static void` `center(JFrame parent, JInternalFrame dialog)` Centers the supplied dialog in its parent's bounds.
`static void` `dismiss(JInternalFrame dialog)` Removes the supplied dialog from its parent container, but does not dispose it.
`static void` `display(JFrame parent, JInternalFrame dialog)` Display a dialog centered within the given frame.
`static void` `dispose(JInternalFrame dialog)` Handles safely dismissing and disposing of the supplied dialog.
`static JComboBox` `getOrientationComboBox(ActionListener l)` Create and return a combo box seeded with the various possible orientation direction names.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EditorDialogUtil

    public EditorDialogUtil()

Method Detail

### addButton

    public static void addButton(ActionListener l,
                                 Container container,
                                 String name,
                                 String cmd)

  Add a button to a container with the given parameters and action listener.

  Parameters:
    `l` - the listener.
    `container` - the container.
    `name` - the button name.
    `cmd` - the action command.

### getOrientationComboBox

    public static JComboBox getOrientationComboBox(ActionListener l)

  Create and return a combo box seeded with the various possible orientation direction names.

  Parameters:
    `l` - the listener.
  Returns:
    the combo box.

### center

    public static void center(JFrame parent,
                              JInternalFrame dialog)

  Centers the supplied dialog in its parent's bounds.

### display

    public static void display(JFrame parent,
                               JInternalFrame dialog)

  Display a dialog centered within the given frame.

  Parameters:
    `parent` - the parent frame.
    `dialog` - the dialog.

### dismiss

    public static void dismiss(JInternalFrame dialog)

  Removes the supplied dialog from its parent container, but does not dispose it.

### dispose

    public static void dispose(JInternalFrame dialog)

  Handles safely dismissing and disposing of the supplied dialog.

Copyright © 2011. All Rights Reserved.