Oracle Data-aware Controls Reference

oracle.dacf.style.control
Class StylePropertyEditor

java.lang.Object
  extended byoracle.dacf.style.control.StylePropertyEditor
All Implemented Interfaces:
javax.swing.CellEditor, javax.swing.table.TableCellEditor

public class StylePropertyEditor
extends java.lang.Object
implements javax.swing.table.TableCellEditor

the StylePropertyEditor wraps the PropertyCellEditor and maps the Style data provided by the StyleClass

Version:
PUBLIC

Constructor Summary
StylePropertyEditor(StyleElement data, javax.swing.JFrame frame)
          Constructor
 
Method Summary
 void addCellEditorListener(javax.swing.event.CellEditorListener l)
          Adds a CellEditorListener
 void cancelCellEditing()
          Tell the editor to cancel editing and not accept any partially * edited value.
 java.lang.Object getCellEditorValue()
          Returns the value contained in the editor
 int getClickCountToStart()
          returns the clickCountToStart value
 java.awt.Component getComponent()
          returns the property editor component
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
          Returns the component that should be added to the client's Component hierarchy.
 boolean isCellEditable(java.util.EventObject anEvent)
          Ask the editor if it can start editing using anEvent.
 void removeCellEditorListener(javax.swing.event.CellEditorListener l)
          Remove a CellEditorListener
 void setClickCountToStart(int n)
          clickCountToStart controls the number of clicks required to start * editing if the event passed to isCellEditable() or startCellEditing() is * a MouseEvent.
 boolean shouldSelectCell(java.util.EventObject anEvent)
          Tell the editor to start editing using anEvent.
 boolean stopCellEditing()
          Tell the editor to stop editing * * @return true if editing was stopped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StylePropertyEditor

public StylePropertyEditor(StyleElement data,
                           javax.swing.JFrame frame)
Constructor

Parameters:
data - the StyleClass holding the data you want to edit
frame - the parent frame
Method Detail

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
                                                      java.lang.Object value,
                                                      boolean isSelected,
                                                      int row,
                                                      int column)
Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

Specified by:
getTableCellEditorComponent in interface javax.swing.table.TableCellEditor
Parameters:
table - the JTable that is asking the editor to edit This parameter can be null.
value - the value of the cell to be edited. It is up to the specific editor to interpret and draw the value. eg. if value is the String "true", it could be rendered as a string or it could be rendered as a check box that is checked. null is a valid value.
isSelected - true is the cell is to be renderer with selection highlighting
row - the row of the cell being edited
column - the column of the cell being edited
Returns:
the component for editing

getCellEditorValue

public java.lang.Object getCellEditorValue()
Returns the value contained in the editor

Specified by:
getCellEditorValue in interface javax.swing.CellEditor
Returns:
the value contained in the editor

getComponent

public java.awt.Component getComponent()
returns the property editor component

Returns:
the Component that represents the Property Editor

stopCellEditing

public boolean stopCellEditing()
Tell the editor to stop editing * * @return true if editing was stopped

Specified by:
stopCellEditing in interface javax.swing.CellEditor

cancelCellEditing

public void cancelCellEditing()
Tell the editor to cancel editing and not accept any partially * edited value.

Specified by:
cancelCellEditing in interface javax.swing.CellEditor

isCellEditable

public boolean isCellEditable(java.util.EventObject anEvent)
Ask the editor if it can start editing using anEvent. * * @param anEvent the event the editor should use to consider * whether to begin editing or not. * @return true if editing can be started.

Specified by:
isCellEditable in interface javax.swing.CellEditor
See Also:
#shouldSelectCell()

shouldSelectCell

public boolean shouldSelectCell(java.util.EventObject anEvent)
Tell the editor to start editing using anEvent. * @param anEvent the event the editor should use to start * editing. * @return true if the editor would like the editing cell to be selected * @see #isCellEditable()

Specified by:
shouldSelectCell in interface javax.swing.CellEditor

addCellEditorListener

public void addCellEditorListener(javax.swing.event.CellEditorListener l)
Adds a CellEditorListener

Specified by:
addCellEditorListener in interface javax.swing.CellEditor
Parameters:
l - CellEditorListener

removeCellEditorListener

public void removeCellEditorListener(javax.swing.event.CellEditorListener l)
Remove a CellEditorListener

Specified by:
removeCellEditorListener in interface javax.swing.CellEditor
Parameters:
l - CellEditorListener

setClickCountToStart

public void setClickCountToStart(int n)
clickCountToStart controls the number of clicks required to start * editing if the event passed to isCellEditable() or startCellEditing() is * a MouseEvent. For example, by default the clickCountToStart for * a JTextField is set to 2, so in a JTable the user will need to * double click to begin editing a cell. * This method sets the clickCountToStart * * @param count the new clickCountToStart value


getClickCountToStart

public int getClickCountToStart()
returns the clickCountToStart value

Returns:
the clickCountToStart value

Oracle Data-aware Controls Reference

 

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