G4P GUI Builder  4.4
Visual GUI designer for the G4P v4.3.1 library
 All Classes Namespaces Functions Variables
g4p.tool.gui.propertygrid.EditorJTextfield Class Reference
Inheritance diagram for g4p.tool.gui.propertygrid.EditorJTextfield:

Public Member Functions

 EditorJTextfield ()
 
boolean stopCellEditing ()
 
Component getTableCellEditorComponent (JTable table, Object value, boolean isSelected, int row, int column)
 
Object getCellEditorValue ()
 
- Public Member Functions inherited from g4p.tool.gui.propertygrid.EditorBase
void setSelected (Object value)
 

Protected Member Functions

void doneWithEditing ()
 
void setValidHint (boolean valid)
 

Static Protected Attributes

static JTextField component
 
static Color ok = new Color(200,255,200)
 
static Color notok = new Color(255,200,200)
 

Private Member Functions

boolean isValid (Object vo)
 

Additional Inherited Members

- Public Attributes inherited from g4p.tool.gui.propertygrid.EditorBase
Validator validator = null
 
- Public Attributes inherited from g4p.tool.TFileConstants
final String SEP = File.separator
 
final String PDE_TAB_PRETTY_NAME = "gui"
 
final String PDE_TAB_NAME = PDE_TAB_PRETTY_NAME + ".pde"
 
final String CONFIG_FOLDER = "GUI_BUILDER_DATA"
 
final String GUI_MODEL_FILE_FILTER = "gui.ser."
 
final String GUI_MODEL_FILENAME = GUI_MODEL_FILE_FILTER + G4PTool.getCompatibleVersionNo()
 
final String GUI_MODEL_FILE = CONFIG_FOLDER + SEP + GUI_MODEL_FILENAME
 
final String G4P_TOOL_DATA_FOLDER = "tools" + SEP + "##project.name##" + SEP + "data"
 
final String G4P_LIB = "G4P" + SEP + "library" + SEP + "G4P.jar"
 
final String GUI_PDE_BASE = G4P_TOOL_DATA_FOLDER + SEP + "gui_base.txt"
 
final String TAB0_PDE_BASE = G4P_TOOL_DATA_FOLDER + SEP + "tab0.txt"
 

Detailed Description

Default editor for text and numeric input.
The key to this class is selecting the correct validator.

Author
Peter Lager

Constructor & Destructor Documentation

g4p.tool.gui.propertygrid.EditorJTextfield.EditorJTextfield ( )

Create an integer editor component that accepts any valid integer.

Member Function Documentation

Object g4p.tool.gui.propertygrid.EditorJTextfield.getCellEditorValue ( )

This is called when the editor component loses focus and retrieves the final value for the table model

Component g4p.tool.gui.propertygrid.EditorJTextfield.getTableCellEditorComponent ( JTable  table,
Object  value,
boolean  isSelected,
int  row,
int  column 
)

This is called when the table cell gets focus and returns the editor component.

boolean g4p.tool.gui.propertygrid.EditorJTextfield.isValid ( Object  vo)
private

See if the user supplied in

Parameters
vo
Returns
boolean g4p.tool.gui.propertygrid.EditorJTextfield.stopCellEditing ( )

Get the latest value and make sure it is valid or empty.
If it is invalid then prevent the focus leaving the component.


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