net.datacrow.console
Class ComponentFactory

java.lang.Object
  extended by net.datacrow.console.ComponentFactory

public final class ComponentFactory
extends java.lang.Object

Used to create each and every component for the Data Crow GUI.

Author:
Robert Jan van der Waals

Field Summary
static int _AVAILABILITYCOMBO
           
static int _CHARACTERFIELD
           
static int _CHARACTERSETCOMBO
           
static int _CHECKBOX
           
static int _COLORSELECTOR
           
static java.awt.Cursor _CURSOR_NORMAL
           
static java.awt.Cursor _CURSOR_WAIT
           
static int _DATEFIELD
           
static int _DECIMALFIELD
           
static int _DIRECTORIESASDRIVES
           
static int _DIRECTORYFIELD
           
static int _DRIVEMAPPING
           
static int _FILEFIELD
           
static int _FILELAUNCHFIELD
           
static int _FILESIZEFIELD
           
static int _FONTRENDERINGCOMBO
           
static int _FONTSELECTOR
           
static int _HASHTYPECOMBO
           
static int _LANGUAGECOMBO
           
static int _LOGINNAMEFIELD
           
static int _LONGTEXTFIELD
           
static int _LOOKANDFEELSELECTOR
           
static int _MODULESELECTOR
           
static int _NUMBERFIELD
           
static int _PASSWORDFIELD
           
static int _PERSONDISPLAYFORMATCOMBO
           
static int _PERSONORDERCOMBO
           
static int _PICTUREFIELD
           
static int _PROGRAMDEFINITIONFIELD
           
static int _RATINGCOMBOBOX
           
static int _REFERENCEFIELD
           
static int _REFERENCESFIELD
           
static int _SHORTTEXTFIELD
           
static int _SIMPLEPICTUREFIELD
           
static int _SIMPLEREFERENCESFIELD
           
static int _THEMEFIELD
           
static int _TIMEFIELD
           
static int _URLFIELD
           
static int _YESNOCOMBO
           
 
Constructor Summary
ComponentFactory()
           
 
Method Summary
static void clean(java.awt.Component component)
          Cleans the component.
static DcComboBox getAvailabilityCombo()
           
static AwsKeyRequestDialog getAwsKeyRequestField()
           
static DcButton getButton(javax.swing.ImageIcon icon)
           
static DcButton getButton(java.lang.String buttonText)
           
static DcButton getButton(java.lang.String buttonText, javax.swing.ImageIcon icon)
           
static javax.swing.JComboBox getCharacterSetCombobox()
           
static DcCheckBox getCheckBox(java.lang.String labelText)
           
static DcColorSelector getColorSelector(java.lang.String settingsKey)
           
static DcComboBox getComboBox()
           
static DcComboBox getComboBox(javax.swing.DefaultComboBoxModel model)
           
static DcComboBox getComboBox(java.lang.Object[] items)
           
static javax.swing.JComponent getComponent(int majormodule, int minormodule, int fieldIdx, int fieldType, java.lang.String label, int maxTextLength)
           
static java.awt.Color getCurrentForegroundColor()
           
static DcDateField getDateField()
           
static DcTable getDCTable(boolean readonly, boolean caching)
           
static DcTable getDCTable(DcModule module, boolean readonly, boolean caching)
           
static DcDecimalField getDecimalField()
           
static DcDirectoriesAsDrivesField getDirectoriesAsDrivesField()
           
static java.awt.Color getDisabledColor()
           
static DcDriveMappingField getDriveMappingField()
           
static DcFileField getFileField(boolean save, boolean dirsOnly)
           
static DcFileField getFileField(boolean save, boolean dirsOnly, javax.swing.filechooser.FileFilter filter)
           
static DcFileLauncherField getFileLaunchField()
           
static DcFilePatternField getFilePatternField(int module)
           
static DcFilePatternTextField getFilePatternTextField()
           
static DcFileSizeField getFileSizeField()
           
static javax.swing.JComboBox getFontRenderingCombo()
           
static DcFontSelector getFontSelector()
           
static javax.swing.JComboBox getHashTypeComboBox()
           
static DcLongTextField getHelpTextField()
           
static DcHtmlEditorPane getHtmlEditorPane()
           
static DcButton getIconButton(javax.swing.ImageIcon icon)
           
static DcIconSelectField getIconSelectField(javax.swing.ImageIcon icon)
           
static DcShortTextField getIdFieldDisabled()
           
static DcImageLabel getImageLabel(javax.swing.ImageIcon icon)
           
static DcShortTextField getISO9001ShortTextField(int maxTextLength)
           
static DcLabel getLabel(javax.swing.ImageIcon icon)
           
static DcLabel getLabel(java.lang.String labelText)
           
static DcLabel getLabel(java.lang.String labelText, javax.swing.ImageIcon icon)
           
static javax.swing.JLabel getLabel(java.lang.String labelText, int length)
           
static javax.swing.JComboBox getLanguageCombobox()
           
static DcLoginNameField getLoginNameField()
           
static DcLongTextField getLongTextField()
           
static DcLookAndFeelSelector getLookAndFeelSelector()
           
static DcMenu getMenu(javax.swing.ImageIcon icon, java.lang.String text)
           
static DcMenu getMenu(java.lang.String text)
           
static javax.swing.JMenuBar getMenuBar()
           
static DcMenuItem getMenuItem(javax.swing.AbstractAction action)
           
static DcMenuItem getMenuItem(javax.swing.ImageIcon icon, java.lang.String text)
           
static DcMenuItem getMenuItem(Plugin plugin)
           
static DcMenuItem getMenuItem(java.lang.String text)
           
static DcModuleSelector getModuleSelector()
           
static DcComboBox getMP3GenreComboBox()
           
static DcNumberField getNumberField()
           
static DcObjectComboBox getObjectCombo(int module)
           
static DcPasswordField getPasswordField()
           
static javax.swing.JComboBox getPersonDisplayFormatComboBox()
           
static javax.swing.JComboBox getPersonOrderComboBox()
           
static DcPictureField getPictureField(boolean scaled, boolean allowActions)
           
static int getPreferredButtonHeight()
           
static int getPreferredFieldHeight()
           
static DcProgramDefinitionsField getProgramDefinitionField()
           
static DcRadioButton getRadioButton(java.lang.String label, javax.swing.ImageIcon icon)
           
static DcRadioButton getRadioButton(java.lang.String label, javax.swing.ImageIcon icon, java.lang.String command)
           
static DcRatingComboBox getRatingComboBox()
           
static DcReferenceField getReferenceField(int module)
           
static DcReferencesField getReferencesField(int mappingModIdx)
           
static java.awt.Color getRequiredColor()
           
static javax.swing.border.TitledBorder getSelectionBorder()
           
static DcShortTextField getShortTextField(int maxTextLength)
           
static DcReferencesField getSimpleReferencesField(int mappingModIdx)
           
static java.awt.Font getStandardFont()
           
static java.awt.Font getSystemFont()
           
static DcTabbedPane getTabbedPane()
           
static DcButton getTableHeader(java.lang.String title)
           
static java.awt.Color getTableHeaderColor()
           
static DcLongTextField getTextArea()
           
static DcShortTextField getTextFieldDisabled()
           
static DcTextPane getTextPane()
           
static DcTimeField getTimeField()
           
static javax.swing.border.TitledBorder getTitleBorder(java.lang.String title)
           
static DcToolBarButton getToolBarButton(Plugin plugin)
           
static DcTree getTree(javax.swing.tree.DefaultMutableTreeNode model)
           
static java.awt.Font getUnreadableFont()
           
static DcUrlField getURLField(int maxLength)
           
static java.lang.Object getValue(javax.swing.JComponent c)
           
static DcComboBox getYesNoCombo()
           
static void setBorder(javax.swing.JComponent c)
           
static void setLookAndFeel()
           
static void setUneditable(javax.swing.JComponent component)
           
static void setValue(javax.swing.JComponent c, java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_YESNOCOMBO

public static final int _YESNOCOMBO
See Also:
Constant Field Values

_LONGTEXTFIELD

public static final int _LONGTEXTFIELD
See Also:
Constant Field Values

_CHECKBOX

public static final int _CHECKBOX
See Also:
Constant Field Values

_NUMBERFIELD

public static final int _NUMBERFIELD
See Also:
Constant Field Values

_SHORTTEXTFIELD

public static final int _SHORTTEXTFIELD
See Also:
Constant Field Values

_URLFIELD

public static final int _URLFIELD
See Also:
Constant Field Values

_PICTUREFIELD

public static final int _PICTUREFIELD
See Also:
Constant Field Values

_FONTSELECTOR

public static final int _FONTSELECTOR
See Also:
Constant Field Values

_TIMEFIELD

public static final int _TIMEFIELD
See Also:
Constant Field Values

_THEMEFIELD

public static final int _THEMEFIELD
See Also:
Constant Field Values

_RATINGCOMBOBOX

public static final int _RATINGCOMBOBOX
See Also:
Constant Field Values

_FILEFIELD

public static final int _FILEFIELD
See Also:
Constant Field Values

_PASSWORDFIELD

public static final int _PASSWORDFIELD
See Also:
Constant Field Values

_LOOKANDFEELSELECTOR

public static final int _LOOKANDFEELSELECTOR
See Also:
Constant Field Values

_MODULESELECTOR

public static final int _MODULESELECTOR
See Also:
Constant Field Values

_FILELAUNCHFIELD

public static final int _FILELAUNCHFIELD
See Also:
Constant Field Values

_COLORSELECTOR

public static final int _COLORSELECTOR
See Also:
Constant Field Values

_DATEFIELD

public static final int _DATEFIELD
See Also:
Constant Field Values

_PROGRAMDEFINITIONFIELD

public static final int _PROGRAMDEFINITIONFIELD
See Also:
Constant Field Values

_REFERENCEFIELD

public static final int _REFERENCEFIELD
See Also:
Constant Field Values

_REFERENCESFIELD

public static final int _REFERENCESFIELD
See Also:
Constant Field Values

_AVAILABILITYCOMBO

public static final int _AVAILABILITYCOMBO
See Also:
Constant Field Values

_SIMPLEPICTUREFIELD

public static final int _SIMPLEPICTUREFIELD
See Also:
Constant Field Values

_DECIMALFIELD

public static final int _DECIMALFIELD
See Also:
Constant Field Values

_CHARACTERFIELD

public static final int _CHARACTERFIELD
See Also:
Constant Field Values

_FILESIZEFIELD

public static final int _FILESIZEFIELD
See Also:
Constant Field Values

_LOGINNAMEFIELD

public static final int _LOGINNAMEFIELD
See Also:
Constant Field Values

_HASHTYPECOMBO

public static final int _HASHTYPECOMBO
See Also:
Constant Field Values

_PERSONORDERCOMBO

public static final int _PERSONORDERCOMBO
See Also:
Constant Field Values

_PERSONDISPLAYFORMATCOMBO

public static final int _PERSONDISPLAYFORMATCOMBO
See Also:
Constant Field Values

_LANGUAGECOMBO

public static final int _LANGUAGECOMBO
See Also:
Constant Field Values

_DRIVEMAPPING

public static final int _DRIVEMAPPING
See Also:
Constant Field Values

_CHARACTERSETCOMBO

public static final int _CHARACTERSETCOMBO
See Also:
Constant Field Values

_DIRECTORIESASDRIVES

public static final int _DIRECTORIESASDRIVES
See Also:
Constant Field Values

_FONTRENDERINGCOMBO

public static final int _FONTRENDERINGCOMBO
See Also:
Constant Field Values

_DIRECTORYFIELD

public static final int _DIRECTORYFIELD
See Also:
Constant Field Values

_SIMPLEREFERENCESFIELD

public static final int _SIMPLEREFERENCESFIELD
See Also:
Constant Field Values

_CURSOR_NORMAL

public static final java.awt.Cursor _CURSOR_NORMAL

_CURSOR_WAIT

public static final java.awt.Cursor _CURSOR_WAIT
Constructor Detail

ComponentFactory

public ComponentFactory()
Method Detail

clean

public static final void clean(java.awt.Component component)
Cleans the component. This method tries to dynamically clean any component of its children, listeners and calls specific cleaner methods on custom components. This will ensure the component to get GC-ed. After this call the component can no longer be used.

Parameters:
component - the component to clean

getPreferredFieldHeight

public static int getPreferredFieldHeight()

getPreferredButtonHeight

public static int getPreferredButtonHeight()

setLookAndFeel

public static void setLookAndFeel()

getComponent

public static final javax.swing.JComponent getComponent(int majormodule,
                                                        int minormodule,
                                                        int fieldIdx,
                                                        int fieldType,
                                                        java.lang.String label,
                                                        int maxTextLength)

getHtmlEditorPane

public static DcHtmlEditorPane getHtmlEditorPane()

getHelpTextField

public static DcLongTextField getHelpTextField()

getAwsKeyRequestField

public static final AwsKeyRequestDialog getAwsKeyRequestField()

getColorSelector

public static final DcColorSelector getColorSelector(java.lang.String settingsKey)

setUneditable

public static final void setUneditable(javax.swing.JComponent component)

getProgramDefinitionField

public static final DcProgramDefinitionsField getProgramDefinitionField()

getFileLaunchField

public static final DcFileLauncherField getFileLaunchField()

getModuleSelector

public static final DcModuleSelector getModuleSelector()

getReferencesField

public static final DcReferencesField getReferencesField(int mappingModIdx)

getSimpleReferencesField

public static final DcReferencesField getSimpleReferencesField(int mappingModIdx)

getPasswordField

public static final DcPasswordField getPasswordField()

getFontSelector

public static final DcFontSelector getFontSelector()

getLookAndFeelSelector

public static final DcLookAndFeelSelector getLookAndFeelSelector()

getTimeField

public static final DcTimeField getTimeField()

getHashTypeComboBox

public static final javax.swing.JComboBox getHashTypeComboBox()

getFontRenderingCombo

public static final javax.swing.JComboBox getFontRenderingCombo()

getPersonOrderComboBox

public static final javax.swing.JComboBox getPersonOrderComboBox()

getDriveMappingField

public static final DcDriveMappingField getDriveMappingField()

getDirectoriesAsDrivesField

public static final DcDirectoriesAsDrivesField getDirectoriesAsDrivesField()

getLanguageCombobox

public static final javax.swing.JComboBox getLanguageCombobox()

getCharacterSetCombobox

public static final javax.swing.JComboBox getCharacterSetCombobox()

getPersonDisplayFormatComboBox

public static final javax.swing.JComboBox getPersonDisplayFormatComboBox()

getObjectCombo

public static final DcObjectComboBox getObjectCombo(int module)

getReferenceField

public static final DcReferenceField getReferenceField(int module)

getAvailabilityCombo

public static final DcComboBox getAvailabilityCombo()

getRadioButton

public static final DcRadioButton getRadioButton(java.lang.String label,
                                                 javax.swing.ImageIcon icon,
                                                 java.lang.String command)

getRadioButton

public static final DcRadioButton getRadioButton(java.lang.String label,
                                                 javax.swing.ImageIcon icon)

getFileField

public static final DcFileField getFileField(boolean save,
                                             boolean dirsOnly)

getFileField

public static final DcFileField getFileField(boolean save,
                                             boolean dirsOnly,
                                             javax.swing.filechooser.FileFilter filter)

getFileSizeField

public static final DcFileSizeField getFileSizeField()

getLoginNameField

public static final DcLoginNameField getLoginNameField()

getDateField

public static final DcDateField getDateField()

getPictureField

public static final DcPictureField getPictureField(boolean scaled,
                                                   boolean allowActions)

getURLField

public static final DcUrlField getURLField(int maxLength)

getTree

public static final DcTree getTree(javax.swing.tree.DefaultMutableTreeNode model)

getNumberField

public static final DcNumberField getNumberField()

getDecimalField

public static final DcDecimalField getDecimalField()

getRatingComboBox

public static final DcRatingComboBox getRatingComboBox()

getMP3GenreComboBox

public static final DcComboBox getMP3GenreComboBox()

getComboBox

public static final DcComboBox getComboBox(java.lang.Object[] items)

getIconSelectField

public static final DcIconSelectField getIconSelectField(javax.swing.ImageIcon icon)

getImageLabel

public static final DcImageLabel getImageLabel(javax.swing.ImageIcon icon)

getComboBox

public static final DcComboBox getComboBox()

getComboBox

public static final DcComboBox getComboBox(javax.swing.DefaultComboBoxModel model)

getCheckBox

public static final DcCheckBox getCheckBox(java.lang.String labelText)

getMenuItem

public static final DcMenuItem getMenuItem(java.lang.String text)

getMenuItem

public static final DcMenuItem getMenuItem(javax.swing.AbstractAction action)

getMenuItem

public static final DcMenuItem getMenuItem(javax.swing.ImageIcon icon,
                                           java.lang.String text)

getMenuItem

public static final DcMenuItem getMenuItem(Plugin plugin)

getToolBarButton

public static DcToolBarButton getToolBarButton(Plugin plugin)

getMenu

public static final DcMenu getMenu(java.lang.String text)

getMenu

public static final DcMenu getMenu(javax.swing.ImageIcon icon,
                                   java.lang.String text)

getTableHeader

public static final DcButton getTableHeader(java.lang.String title)

getIconButton

public static final DcButton getIconButton(javax.swing.ImageIcon icon)

getButton

public static final DcButton getButton(javax.swing.ImageIcon icon)

getButton

public static final DcButton getButton(java.lang.String buttonText)

getButton

public static final DcButton getButton(java.lang.String buttonText,
                                       javax.swing.ImageIcon icon)

getTextArea

public static final DcLongTextField getTextArea()

getFilePatternField

public static final DcFilePatternField getFilePatternField(int module)

getTextPane

public static final DcTextPane getTextPane()

getLongTextField

public static final DcLongTextField getLongTextField()

getLabel

public static final DcLabel getLabel(javax.swing.ImageIcon icon)

getLabel

public static final DcLabel getLabel(java.lang.String labelText,
                                     javax.swing.ImageIcon icon)

getLabel

public static final javax.swing.JLabel getLabel(java.lang.String labelText,
                                                int length)

getLabel

public static final DcLabel getLabel(java.lang.String labelText)

getFilePatternTextField

public static final DcFilePatternTextField getFilePatternTextField()

getShortTextField

public static final DcShortTextField getShortTextField(int maxTextLength)

getISO9001ShortTextField

public static final DcShortTextField getISO9001ShortTextField(int maxTextLength)

getTextFieldDisabled

public static final DcShortTextField getTextFieldDisabled()

setBorder

public static final void setBorder(javax.swing.JComponent c)

getIdFieldDisabled

public static final DcShortTextField getIdFieldDisabled()

getTabbedPane

public static final DcTabbedPane getTabbedPane()

getDCTable

public static final DcTable getDCTable(boolean readonly,
                                       boolean caching)

getDCTable

public static final DcTable getDCTable(DcModule module,
                                       boolean readonly,
                                       boolean caching)

getMenuBar

public static final javax.swing.JMenuBar getMenuBar()

getYesNoCombo

public static final DcComboBox getYesNoCombo()

getSelectionBorder

public static final javax.swing.border.TitledBorder getSelectionBorder()

getTitleBorder

public static final javax.swing.border.TitledBorder getTitleBorder(java.lang.String title)

getCurrentForegroundColor

public static final java.awt.Color getCurrentForegroundColor()

getStandardFont

public static final java.awt.Font getStandardFont()

getSystemFont

public static final java.awt.Font getSystemFont()

getUnreadableFont

public static final java.awt.Font getUnreadableFont()

getDisabledColor

public static final java.awt.Color getDisabledColor()

getRequiredColor

public static final java.awt.Color getRequiredColor()

getTableHeaderColor

public static final java.awt.Color getTableHeaderColor()

setValue

public static final void setValue(javax.swing.JComponent c,
                                  java.lang.Object o)

getValue

public static java.lang.Object getValue(javax.swing.JComponent c)