org.formaria.editor.project.dialog
Class PropertyComponentFactory

java.lang.Object
  extended by org.formaria.editor.project.dialog.PropertyComponentFactory

public class PropertyComponentFactory
extends java.lang.Object

For creating rows within the PropertyEditor and the StyleEditor

Copyright: Copyright (c) Formaria Ltd., 1998-2003

$Revision: 1.1 $


Constructor Summary
PropertyComponentFactory()
           
 
Method Summary
static javax.swing.JComboBox addComboProperty(java.lang.String propertyName, int selIdx, java.lang.String[] values, java.awt.Container page, java.awt.event.ItemListener ilistener)
          Adds a combo field and a label to the toolbar for the named property
static javax.swing.JLabel addLabelProperty(java.lang.String propertyName, javax.swing.JComponent parent, java.lang.String action, java.awt.event.ActionListener aListener, boolean addButton)
           
static javax.swing.JTextField addProperty(java.lang.String propertyName, java.lang.String content, boolean optional, javax.swing.JComponent parent, java.awt.event.ActionListener alistener, int width)
           
static void addSpacer(java.lang.String title, java.awt.Container page)
          Adds a edit field and a label to the toolbar for the named property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyComponentFactory

public PropertyComponentFactory()
Method Detail

addSpacer

public static void addSpacer(java.lang.String title,
                             java.awt.Container page)
Adds a edit field and a label to the toolbar for the named property

Parameters:
title - the property name/label

addComboProperty

public static javax.swing.JComboBox addComboProperty(java.lang.String propertyName,
                                                     int selIdx,
                                                     java.lang.String[] values,
                                                     java.awt.Container page,
                                                     java.awt.event.ItemListener ilistener)
Adds a combo field and a label to the toolbar for the named property

Parameters:
propertyName - the property name/label
selIdx - the index of the selected item in the dropdown
values - the dropdown list's values
page - the Page to get the componentFactory from
ilistener - the ItemListener which will be added to the combobox
Returns:
the edit field for the property

addProperty

public static javax.swing.JTextField addProperty(java.lang.String propertyName,
                                                 java.lang.String content,
                                                 boolean optional,
                                                 javax.swing.JComponent parent,
                                                 java.awt.event.ActionListener alistener,
                                                 int width)

addLabelProperty

public static javax.swing.JLabel addLabelProperty(java.lang.String propertyName,
                                                  javax.swing.JComponent parent,
                                                  java.lang.String action,
                                                  java.awt.event.ActionListener aListener,
                                                  boolean addButton)
Parameters:
propertyName - the name of the property to add
parent - The component to which to add the newly created component.
action - The String to set as the action command
aListener - The ActionListener to add to the component
width - The width of the new component
btnoffset - The horizontal offset at which to position the component
Returns:
the newly created Label