Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.ide.db.controls
Class ListButtons

java.lang.Object
  extended by oracle.ide.db.controls.ListButtons

public final class ListButtons
extends java.lang.Object

Associated a number of buttons to use with a JList to add/remove/move elements in the list. The JList must have a DefaultListModel for a model. This panel provides a Container for the JList and all the buttons that should be added to a parent panel in place of the list.

A Helper must be provided for the add and remove buttons to be included as the Helper is responsible for actioning those buttons.


Nested Class Summary
static class ListButtons.Controller
           
static interface ListButtons.Helper
          Deprecated. - use Controller
static class ListButtons.HelperAdapter
          Deprecated. - use Controller
 
Constructor Summary
ListButtons(javax.swing.JList list, ListButtons.Controller helper)
           
 
Method Summary
 void addCustomButton(javax.swing.Icon icon, java.lang.String text, java.lang.String buttonName)
          Adds a custom button to the bottom of the button list.
 void enableButtons()
          Enables/disables the buttons on the panel according to the rules of the Helper registered.
 javax.swing.JComponent getComponent()
          Gets the component containing the list and all the buttons.
 void setEnabled(boolean enabled)
          Enable/disable the panel and all the buttons.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListButtons

public ListButtons(javax.swing.JList list,
                   ListButtons.Controller helper)
Method Detail

getComponent

public javax.swing.JComponent getComponent()
Gets the component containing the list and all the buttons.


addCustomButton

public final void addCustomButton(javax.swing.Icon icon,
                                  java.lang.String text,
                                  java.lang.String buttonName)
Adds a custom button to the bottom of the button list. Provide and icon and tooltip text for the display of the button, and a unique name for the button which will be used as the component name, and as the identifier on the ListButtons.Controller for the customButtonPressed method.

You must have a ListButtons.Controller registered to use this method.

Parameters:
icon - the icon for the button
tttext - the button's tooltip text (and accessible description)
buttonName - a unique name to identify the component

enableButtons

public void enableButtons()
Enables/disables the buttons on the panel according to the rules of the Helper registered.

See Also:
ListButtons.Helper

setEnabled

public void setEnabled(boolean enabled)
Enable/disable the panel and all the buttons.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

Copyright © 1997, 2011, Oracle. All rights reserved.