org.formaria.editor.project.pages.components.properties
Class GridBagLayoutConstraintProperty

java.lang.Object
  extended by org.formaria.editor.project.pages.components.properties.PlainProperty
      extended by org.formaria.editor.project.pages.components.properties.GridBagLayoutConstraintProperty

public class GridBagLayoutConstraintProperty
extends PlainProperty

A helper class for working with GridBag layout manager contraints.

Copyright (c) Formaria Ltd., 2002-2003

License: see license.txt

$Revision: 1.3 $


Field Summary
static java.lang.String[] gridBagConstraints
           
 
Fields inherited from class org.formaria.editor.project.pages.components.properties.PlainProperty
argType, BOOLEAN_PROPERTY, COMPONENT_NAME_PROPERTY, currentProject, DATA_PROPERTY, DOUBLE_PROPERTY, EVENT_HANDLER_PROPERTY, getterMethod, getterName, IMAGE_NAME_PROPERTY, INT_LIST_PROPERTY, INTEGER_PROPERTY, isEnabled, LANG_PROPERTY, LAYOUT_CONSTRAINT_PROPERTY, LAYOUT_PROPERTY, LIST_PROPERTY, PLAIN_PROPERTY, propertyName, setterMethod, setterName, STYLE_PROPERTY, VALIDATION_PROPERTY
 
Constructor Summary
GridBagLayoutConstraintProperty()
          Creates a new instance of GridBagLayoutConstraintProperty
 
Method Summary
 javax.swing.table.TableCellEditor getCellEditor(javax.swing.JTable table, java.lang.Object comp, EditorProject currentProject, PropertyHelper propertyHelper, java.lang.String propertyName, int row, int col, java.lang.Object value)
          Get a table cell editor
 int getPropertyType()
           
 java.lang.Object getPropertyValue(PropertyHelper propertyHelper, PageResource pageResource, java.lang.Object comp, java.lang.String propertyName)
          Get the value of the property exposed by the component.
 boolean setPropertyValue(PropertyHelper propertyHelper, PageResource pageResource, java.lang.Object comp, java.lang.String propertyName, java.lang.Object value)
          Set the value of the property exposed by the component
 
Methods inherited from class org.formaria.editor.project.pages.components.properties.PlainProperty
getBuilder, getDisplayPropertyValue, getEnabled, getExpression, getExpression, getIsCloneable, getOutputPropertyValue, getPropertyName, getViaReflection, isDataBindingProperty, setEnabled, setExpression, setExpression, setGetterName, setSetterName, setViaReflection, setViaReflection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gridBagConstraints

public static final java.lang.String[] gridBagConstraints
Constructor Detail

GridBagLayoutConstraintProperty

public GridBagLayoutConstraintProperty()
Creates a new instance of GridBagLayoutConstraintProperty

Method Detail

getPropertyValue

public java.lang.Object getPropertyValue(PropertyHelper propertyHelper,
                                         PageResource pageResource,
                                         java.lang.Object comp,
                                         java.lang.String propertyName)
Get the value of the property exposed by the component. The GridBagConstraint values are specified in the following order
  1. constraints.gridx
  2. constraints.gridy
  3. constraints.gridwidth
  4. constraints.gridheight
  5. constraints.fill
  6. constraints.ipadx
  7. constraints.ipady
  8. constraints.insets.left
  9. constraints.insets.top
  10. constraints.insets.right
  11. constraints.insets.bottom
  12. constraints.anchor
  13. constraints.weightx (double)
  14. constraints.weighty (double)

Overrides:
getPropertyValue in class PlainProperty
Parameters:
propertyHelper - the helper that is using this property
pageResource - the page resource to which this component belongs
comp - the component instance
propertyName - the property name
Returns:
the value

setPropertyValue

public boolean setPropertyValue(PropertyHelper propertyHelper,
                                PageResource pageResource,
                                java.lang.Object comp,
                                java.lang.String propertyName,
                                java.lang.Object value)
Set the value of the property exposed by the component

Overrides:
setPropertyValue in class PlainProperty
Parameters:
propertyHelper - the helper that is using this property
pageResource - the page resource to which this component belongs
comp - the component instance
propertyName - the property name
Returns:
true is the property is set OK

getCellEditor

public javax.swing.table.TableCellEditor getCellEditor(javax.swing.JTable table,
                                                       java.lang.Object comp,
                                                       EditorProject currentProject,
                                                       PropertyHelper propertyHelper,
                                                       java.lang.String propertyName,
                                                       int row,
                                                       int col,
                                                       java.lang.Object value)
Get a table cell editor

Overrides:
getCellEditor in class PlainProperty
Parameters:
table - the table being edited
comp - the current component
currentProject - the current project
propertyHelper - the owner propertyHelper
propertyName - the property name
row - the current row
col - the current column
the - current value

getPropertyType

public int getPropertyType()
Overrides:
getPropertyType in class PlainProperty