org.jminor.framework.client.ui
Class EntityUiUtil

java.lang.Object
  extended by org.jminor.framework.client.ui.EntityUiUtil

public final class EntityUiUtil
extends Object

A static utility class concerned with UI related tasks.


Nested Class Summary
static class EntityUiUtil.EntityComboBoxValueLink
           
static class EntityUiUtil.EntityFieldPanel
           
static class EntityUiUtil.LookupValueLink
          A class for linking an EntityLookupModel to a EntityEditModel foreign key property value.
 
Method Summary
static SteppedComboBox createBooleanComboBox(Property property, EntityEditModel editModel)
           
static SteppedComboBox createBooleanComboBox(Property property, EntityEditModel editModel, StateObserver enabledState)
           
static JCheckBox createCheckBox(Property property, EntityEditModel editModel)
           
static JCheckBox createCheckBox(Property property, EntityEditModel editModel, StateObserver enabledState)
           
static JCheckBox createCheckBox(Property property, EntityEditModel editModel, StateObserver enabledState, boolean includeCaption)
           
static SteppedComboBox createComboBox(Property property, EntityEditModel editModel, ComboBoxModel model, StateObserver enabledState)
           
static SteppedComboBox createComboBox(Property property, EntityEditModel editModel, ComboBoxModel model, StateObserver enabledState, boolean editable)
           
static DateInputPanel createDateInputPanel(Property property, EntityEditModel editModel, SimpleDateFormat dateFormat, LinkType linkType, boolean includeButton)
           
static DateInputPanel createDateInputPanel(Property property, EntityEditModel editModel, SimpleDateFormat dateFormat, LinkType linkType, boolean includeButton, StateObserver enabledState)
           
static EntityComboBox createEntityComboBox(Property.ForeignKeyProperty foreignKeyProperty, EntityEditModel editModel)
           
static EntityComboBox createEntityComboBox(Property.ForeignKeyProperty foreignKeyProperty, EntityEditModel editModel, StateObserver enabledState)
           
static JPanel createEntityComboBoxFilterPanel(EntityComboBox entityComboBox, String foreignKeyPropertyID, boolean filterButtonTakesFocus)
           
static JPanel createEntityComboBoxPanel(EntityComboBox entityComboBox, EntityPanelProvider panelProvider, boolean newRecordButtonTakesFocus)
           
static JTextField createEntityField(Property.ForeignKeyProperty foreignKeyProperty, EntityEditModel editModel)
           
static EntityUiUtil.EntityFieldPanel createEntityFieldPanel(Property.ForeignKeyProperty foreignKeyProperty, EntityEditModel editModel, EntityTableModel lookupModel)
           
static EntityLookupField createEntityLookupField(Property.ForeignKeyProperty foreignKeyProperty, EntityEditModel editModel)
           
static EntityLookupField createEntityLookupField(Property.ForeignKeyProperty foreignKeyProperty, EntityEditModel editModel, Criteria additionalSearchCriteria, String... searchPropertyIDs)
           
static EntityLookupField createEntityLookupField(Property.ForeignKeyProperty foreignKeyProperty, EntityEditModel editModel, String... searchPropertyIDs)
           
static JLabel createLabel(Property property)
          Creates a JLabel with a caption from the given property, using the default label text alignment
static JLabel createLabel(Property property, int horizontalAlignment)
          Creates a JLabel with a caption from the given property
static JPanel createLookupFieldPanel(EntityLookupField lookupField, EntityTableModel tableModel)
           
static SteppedComboBox createPropertyComboBox(Property.ColumnProperty property, EntityEditModel editModel)
           
static SteppedComboBox createPropertyComboBox(Property.ColumnProperty property, EntityEditModel editModel, EventObserver refreshEvent)
           
static SteppedComboBox createPropertyComboBox(Property.ColumnProperty property, EntityEditModel editModel, EventObserver refreshEvent, StateObserver state)
           
static SteppedComboBox createPropertyComboBox(Property.ColumnProperty property, EntityEditModel editModel, EventObserver refreshEvent, StateObserver state, String nullValue)
           
static SteppedComboBox createPropertyComboBox(Property.ColumnProperty property, EntityEditModel editModel, EventObserver refreshEvent, StateObserver state, String nullValue, boolean editable)
           
static SteppedComboBox createPropertyComboBox(String propertyID, EntityEditModel editModel)
           
static SteppedComboBox createPropertyComboBox(String propertyID, EntityEditModel editModel, EventObserver refreshEvent)
           
static SteppedComboBox createPropertyComboBox(String propertyID, EntityEditModel editModel, EventObserver refreshEvent, StateObserver state)
           
static SteppedComboBox createPropertyComboBox(String propertyID, EntityEditModel editModel, EventObserver refreshEvent, StateObserver state, String nullValue)
           
static JTextArea createTextArea(Property property, EntityEditModel editModel, LinkType linkType)
           
static JTextArea createTextArea(Property property, EntityEditModel editModel, LinkType linkType, int rows, int columns)
           
static JTextField createTextField(Property property, EntityEditModel editModel)
           
static JTextField createTextField(Property property, EntityEditModel editModel, LinkType linkType, String formatMaskString, boolean immediateUpdate)
           
static JTextField createTextField(Property property, EntityEditModel editModel, LinkType linkType, String formatMaskString, boolean immediateUpdate, SimpleDateFormat dateFormat, StateObserver enabledState)
           
static JTextField createTextField(Property property, EntityEditModel editModel, LinkType linkType, String formatMaskString, boolean immediateUpdate, SimpleDateFormat dateFormat, StateObserver enabledState, boolean valueContainsLiteralCharacters)
           
static JTextField createTextField(Property property, EntityEditModel editModel, LinkType linkType, String formatMaskString, boolean immediateUpdate, StateObserver enabledState)
           
static TextInputPanel createTextInputPanel(Property property, EntityEditModel editModel, LinkType linkType, boolean immediateUpdate, boolean buttonFocusable)
           
static TristateCheckBox createTristateCheckBox(Property property, EntityEditModel editModel, StateObserver enabledState, boolean includeCaption)
           
static SteppedComboBox createValueListComboBox(Property.ValueListProperty property, EntityEditModel editModel)
           
static SteppedComboBox createValueListComboBox(Property.ValueListProperty property, EntityEditModel editModel, StateObserver enabledState)
           
static AbstractAction initializeViewImageAction(EntityTablePanel tablePanel, String imagePathPropertyID)
           
static List<Entity> selectEntities(EntityTableModel lookupModel, Window owner, boolean singleSelection, String dialogTitle)
           
static List<Entity> selectEntities(EntityTableModel lookupModel, Window owner, boolean singleSelection, String dialogTitle, Dimension preferredSize)
           
static void setLoggingLevel(JComponent dialogParent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setLoggingLevel

public static void setLoggingLevel(JComponent dialogParent)

initializeViewImageAction

public static AbstractAction initializeViewImageAction(EntityTablePanel tablePanel,
                                                       String imagePathPropertyID)

selectEntities

public static List<Entity> selectEntities(EntityTableModel lookupModel,
                                          Window owner,
                                          boolean singleSelection,
                                          String dialogTitle)
                                   throws CancelException
Throws:
CancelException

selectEntities

public static List<Entity> selectEntities(EntityTableModel lookupModel,
                                          Window owner,
                                          boolean singleSelection,
                                          String dialogTitle,
                                          Dimension preferredSize)
                                   throws CancelException
Throws:
CancelException

createLabel

public static JLabel createLabel(Property property)
Creates a JLabel with a caption from the given property, using the default label text alignment

Parameters:
property - the property for which to create the label
Returns:
a JLabel for the given property
See Also:
Configuration.DEFAULT_LABEL_TEXT_ALIGNMENT

createLabel

public static JLabel createLabel(Property property,
                                 int horizontalAlignment)
Creates a JLabel with a caption from the given property

Parameters:
property - the property for which to create the label
horizontalAlignment - the horizontal text alignment
Returns:
a JLabel for the given property

createCheckBox

public static JCheckBox createCheckBox(Property property,
                                       EntityEditModel editModel)

createCheckBox

public static JCheckBox createCheckBox(Property property,
                                       EntityEditModel editModel,
                                       StateObserver enabledState)

createCheckBox

public static JCheckBox createCheckBox(Property property,
                                       EntityEditModel editModel,
                                       StateObserver enabledState,
                                       boolean includeCaption)

createTristateCheckBox

public static TristateCheckBox createTristateCheckBox(Property property,
                                                      EntityEditModel editModel,
                                                      StateObserver enabledState,
                                                      boolean includeCaption)

createBooleanComboBox

public static SteppedComboBox createBooleanComboBox(Property property,
                                                    EntityEditModel editModel)

createBooleanComboBox

public static SteppedComboBox createBooleanComboBox(Property property,
                                                    EntityEditModel editModel,
                                                    StateObserver enabledState)

createEntityComboBox

public static EntityComboBox createEntityComboBox(Property.ForeignKeyProperty foreignKeyProperty,
                                                  EntityEditModel editModel)

createEntityComboBox

public static EntityComboBox createEntityComboBox(Property.ForeignKeyProperty foreignKeyProperty,
                                                  EntityEditModel editModel,
                                                  StateObserver enabledState)

createEntityFieldPanel

public static EntityUiUtil.EntityFieldPanel createEntityFieldPanel(Property.ForeignKeyProperty foreignKeyProperty,
                                                                   EntityEditModel editModel,
                                                                   EntityTableModel lookupModel)

createEntityField

public static JTextField createEntityField(Property.ForeignKeyProperty foreignKeyProperty,
                                           EntityEditModel editModel)

createEntityLookupField

public static EntityLookupField createEntityLookupField(Property.ForeignKeyProperty foreignKeyProperty,
                                                        EntityEditModel editModel)

createEntityLookupField

public static EntityLookupField createEntityLookupField(Property.ForeignKeyProperty foreignKeyProperty,
                                                        EntityEditModel editModel,
                                                        String... searchPropertyIDs)

createEntityLookupField

public static EntityLookupField createEntityLookupField(Property.ForeignKeyProperty foreignKeyProperty,
                                                        EntityEditModel editModel,
                                                        Criteria additionalSearchCriteria,
                                                        String... searchPropertyIDs)

createValueListComboBox

public static SteppedComboBox createValueListComboBox(Property.ValueListProperty property,
                                                      EntityEditModel editModel)

createValueListComboBox

public static SteppedComboBox createValueListComboBox(Property.ValueListProperty property,
                                                      EntityEditModel editModel,
                                                      StateObserver enabledState)

createComboBox

public static SteppedComboBox createComboBox(Property property,
                                             EntityEditModel editModel,
                                             ComboBoxModel model,
                                             StateObserver enabledState)

createComboBox

public static SteppedComboBox createComboBox(Property property,
                                             EntityEditModel editModel,
                                             ComboBoxModel model,
                                             StateObserver enabledState,
                                             boolean editable)

createDateInputPanel

public static DateInputPanel createDateInputPanel(Property property,
                                                  EntityEditModel editModel,
                                                  SimpleDateFormat dateFormat,
                                                  LinkType linkType,
                                                  boolean includeButton)

createDateInputPanel

public static DateInputPanel createDateInputPanel(Property property,
                                                  EntityEditModel editModel,
                                                  SimpleDateFormat dateFormat,
                                                  LinkType linkType,
                                                  boolean includeButton,
                                                  StateObserver enabledState)

createTextInputPanel

public static TextInputPanel createTextInputPanel(Property property,
                                                  EntityEditModel editModel,
                                                  LinkType linkType,
                                                  boolean immediateUpdate,
                                                  boolean buttonFocusable)

createTextArea

public static JTextArea createTextArea(Property property,
                                       EntityEditModel editModel,
                                       LinkType linkType)

createTextArea

public static JTextArea createTextArea(Property property,
                                       EntityEditModel editModel,
                                       LinkType linkType,
                                       int rows,
                                       int columns)

createTextField

public static JTextField createTextField(Property property,
                                         EntityEditModel editModel)

createTextField

public static JTextField createTextField(Property property,
                                         EntityEditModel editModel,
                                         LinkType linkType,
                                         String formatMaskString,
                                         boolean immediateUpdate)

createTextField

public static JTextField createTextField(Property property,
                                         EntityEditModel editModel,
                                         LinkType linkType,
                                         String formatMaskString,
                                         boolean immediateUpdate,
                                         StateObserver enabledState)

createTextField

public static JTextField createTextField(Property property,
                                         EntityEditModel editModel,
                                         LinkType linkType,
                                         String formatMaskString,
                                         boolean immediateUpdate,
                                         SimpleDateFormat dateFormat,
                                         StateObserver enabledState)

createTextField

public static JTextField createTextField(Property property,
                                         EntityEditModel editModel,
                                         LinkType linkType,
                                         String formatMaskString,
                                         boolean immediateUpdate,
                                         SimpleDateFormat dateFormat,
                                         StateObserver enabledState,
                                         boolean valueContainsLiteralCharacters)

createPropertyComboBox

public static SteppedComboBox createPropertyComboBox(String propertyID,
                                                     EntityEditModel editModel)

createPropertyComboBox

public static SteppedComboBox createPropertyComboBox(String propertyID,
                                                     EntityEditModel editModel,
                                                     EventObserver refreshEvent)

createPropertyComboBox

public static SteppedComboBox createPropertyComboBox(String propertyID,
                                                     EntityEditModel editModel,
                                                     EventObserver refreshEvent,
                                                     StateObserver state)

createPropertyComboBox

public static SteppedComboBox createPropertyComboBox(String propertyID,
                                                     EntityEditModel editModel,
                                                     EventObserver refreshEvent,
                                                     StateObserver state,
                                                     String nullValue)

createPropertyComboBox

public static SteppedComboBox createPropertyComboBox(Property.ColumnProperty property,
                                                     EntityEditModel editModel)

createPropertyComboBox

public static SteppedComboBox createPropertyComboBox(Property.ColumnProperty property,
                                                     EntityEditModel editModel,
                                                     EventObserver refreshEvent)

createPropertyComboBox

public static SteppedComboBox createPropertyComboBox(Property.ColumnProperty property,
                                                     EntityEditModel editModel,
                                                     EventObserver refreshEvent,
                                                     StateObserver state)

createPropertyComboBox

public static SteppedComboBox createPropertyComboBox(Property.ColumnProperty property,
                                                     EntityEditModel editModel,
                                                     EventObserver refreshEvent,
                                                     StateObserver state,
                                                     String nullValue)

createPropertyComboBox

public static SteppedComboBox createPropertyComboBox(Property.ColumnProperty property,
                                                     EntityEditModel editModel,
                                                     EventObserver refreshEvent,
                                                     StateObserver state,
                                                     String nullValue,
                                                     boolean editable)

createLookupFieldPanel

public static JPanel createLookupFieldPanel(EntityLookupField lookupField,
                                            EntityTableModel tableModel)

createEntityComboBoxPanel

public static JPanel createEntityComboBoxPanel(EntityComboBox entityComboBox,
                                               EntityPanelProvider panelProvider,
                                               boolean newRecordButtonTakesFocus)

createEntityComboBoxFilterPanel

public static JPanel createEntityComboBoxFilterPanel(EntityComboBox entityComboBox,
                                                     String foreignKeyPropertyID,
                                                     boolean filterButtonTakesFocus)