cern::gp::beans::editors::ButtonEditor Class Reference

Inheritance diagram for cern::gp::beans::editors::ButtonEditor:
Inheritance graph
[legend]
Collaboration diagram for cern::gp::beans::editors::ButtonEditor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

boolean isPaintable ()
void paintValue (java.awt.Graphics gfx, java.awt.Rectangle box)
Component getInPlaceCustomEditor ()
boolean hasInPlaceCustomEditor ()
boolean supportsEditingTaggedValues ()
void attachEnv (PropertyEnv env)

Protected Member Functions

void handleButtonClick (ActionEvent evt)

Private Member Functions

JButton getButton ()
JButton createButton ()

Private Attributes

JButton button
PropertyEnv propertyEnv

Static Private Attributes

static final int LABEL_OFFSET = 3

Detailed Description

A PropertyEditor that puts a JButton into the corresponding Cell of the ExplorerTable or PropertySheet. As any other PropertyEditor, it is associated with a Bean Property:

For example, if you want to have a button with the label "accept",

Author:
Vito Baggiolini
Version:
Revision
1.2

,

Date
2006/09/25 08:52:36

,

Author
acaproni

Member Function Documentation

void cern::gp::beans::editors::ButtonEditor::attachEnv ( PropertyEnv  env  )  [inline]

References propertyEnv.

JButton cern::gp::beans::editors::ButtonEditor::createButton (  )  [inline, private]

References handleButtonClick(), and propertyEnv.

Referenced by getButton().

JButton cern::gp::beans::editors::ButtonEditor::getButton (  )  [inline, private]

lazy creator class. Should be called only after attachEnv(PropertyEnv)

Returns:
the JButton to be used both as Renderer and Editor

References button, and createButton().

Referenced by getInPlaceCustomEditor(), and paintValue().

Component cern::gp::beans::editors::ButtonEditor::getInPlaceCustomEditor (  )  [inline]

References getButton().

void cern::gp::beans::editors::ButtonEditor::handleButtonClick ( ActionEvent  evt  )  [inline, protected]

method called when the user clicks on the JButton. By default, this implementation does a setValue(Boolean.True) on the Bean property associated with the Button.

Override this if you need to do something else when the button is clicked...

Parameters:
evt the ActionEvent generated by the JButton

References propertyEnv.

Referenced by createButton().

boolean cern::gp::beans::editors::ButtonEditor::hasInPlaceCustomEditor (  )  [inline]
boolean cern::gp::beans::editors::ButtonEditor::isPaintable (  )  [inline]
void cern::gp::beans::editors::ButtonEditor::paintValue ( java.awt.Graphics  gfx,
java.awt.Rectangle  box 
) [inline]

References getButton(), and LABEL_OFFSET.

boolean cern::gp::beans::editors::ButtonEditor::supportsEditingTaggedValues (  )  [inline]

Member Data Documentation

Referenced by getButton().

Referenced by paintValue().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2