Package org.pentaho.di.ui.core.widget
Class ColumnInfo
- java.lang.Object
-
- org.pentaho.di.ui.core.widget.ColumnInfo
-
public class ColumnInfo extends Object
Used to define the behaviour and the content of a Table column in a TableView object.- Since:
- 27-05-2003
- Author:
- Matt
-
-
Field Summary
Fields Modifier and Type Field Description static intCOLUMN_TYPE_BUTTONstatic intCOLUMN_TYPE_CCOMBOstatic intCOLUMN_TYPE_FORMATstatic intCOLUMN_TYPE_ICONstatic intCOLUMN_TYPE_NONEstatic intCOLUMN_TYPE_TEXTstatic intCOLUMN_TYPE_TEXT_BUTTON
-
Constructor Summary
Constructors Constructor Description ColumnInfo(String colname, int coltype)Creates a column info class for use with the TableView class.ColumnInfo(String colname, int coltype, boolean numeric)Creates a column info class for use with the TableView class.ColumnInfo(String colname, int coltype, boolean num, boolean ro)Creates a column info class for use with the TableView class.ColumnInfo(String colname, int coltype, boolean num, boolean ro, int width)Creates a column info class for use with the TableView class.ColumnInfo(String colname, int coltype, int fieldTypeColumn)Creates a column info class for use with the TableView class.ColumnInfo(String colname, int coltype, String[] combo)Creates a column info class for use with the TableView class.ColumnInfo(String colname, int coltype, String[] combo, boolean ro)Creates a column info class for use with the TableView class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAllignement()StringgetButtonText()String[]getComboValues()ComboValuesSelectionListenergetComboValuesSelectionListener()FieldDisabledListenergetDisabledListener()intgetFieldTypeColumn()StringgetName()org.eclipse.swt.events.SelectionListenergetSelectionAdapter()org.eclipse.swt.events.SelectionListenergetTextVarButtonSelectionListener()StringgetToolTip()intgetType()org.pentaho.di.core.row.ValueMetaInterfacegetValueMeta()intgetWidth()voidhideNegative()booleanisAutoResize()booleanisNegativeHidden()booleanisNumeric()booleanisPasswordField()booleanisReadOnly()booleanisUsingVariables()voidsetAllignement(int allign)voidsetAutoResize(boolean resize)If should be resized to accommodate contents.voidsetButtonText(String bt)voidsetCombovalsSupplier(Supplier<String[]> combovalsSupplier)voidsetComboValues(String[] cv)voidsetComboValuesSelectionListener(ComboValuesSelectionListener comboValuesSelectionListener)voidsetDisabledListener(FieldDisabledListener disabledListener)voidsetFieldTypeColumn(int fieldTypeColumn)voidsetNumeric(boolean numeric)voidsetPasswordField(boolean password)voidsetReadOnly(boolean ro)voidsetRenderTextVarButtonCallback(TextVarButtonRenderCallback callback)voidsetSelectionAdapter(org.eclipse.swt.events.SelectionListener sb)voidsetTextVarButtonSelectionListener(org.eclipse.swt.events.SelectionListener textVarButtonSelectionListener)voidsetToolTip(String tip)voidsetUsingVariables(boolean usingVariables)voidsetValueMeta(org.pentaho.di.core.row.ValueMetaInterface valueMeta)booleanshouldRenderTextVarButton()voidshowNegative()StringtoString()
-
-
-
Field Detail
-
COLUMN_TYPE_NONE
public static final int COLUMN_TYPE_NONE
- See Also:
- Constant Field Values
-
COLUMN_TYPE_TEXT
public static final int COLUMN_TYPE_TEXT
- See Also:
- Constant Field Values
-
COLUMN_TYPE_CCOMBO
public static final int COLUMN_TYPE_CCOMBO
- See Also:
- Constant Field Values
-
COLUMN_TYPE_BUTTON
public static final int COLUMN_TYPE_BUTTON
- See Also:
- Constant Field Values
-
COLUMN_TYPE_ICON
public static final int COLUMN_TYPE_ICON
- See Also:
- Constant Field Values
-
COLUMN_TYPE_FORMAT
public static final int COLUMN_TYPE_FORMAT
- See Also:
- Constant Field Values
-
COLUMN_TYPE_TEXT_BUTTON
public static final int COLUMN_TYPE_TEXT_BUTTON
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ColumnInfo
public ColumnInfo(String colname, int coltype)
Creates a column info class for use with the TableView class.- Parameters:
colname- The column namecoltype- The column type (see: COLUMN_TYPE_...)
-
ColumnInfo
public ColumnInfo(String colname, int coltype, String[] combo)
Creates a column info class for use with the TableView class. The type of column info to be created is : COLUMN_TYPE_CCOMBO- Parameters:
colname- The column namecoltype- The column type (see: COLUMN_TYPE_...)combo- The choices in the combo box
-
ColumnInfo
public ColumnInfo(String colname, int coltype, boolean numeric)
Creates a column info class for use with the TableView class.- Parameters:
colname- The column namecoltype- The column type (see: COLUMN_TYPE_...)numeric- true if the column type is numeric. Use setValueType() to specify the type of numeric: ValueMetaInterface.TYPE_INTEGER is the default.
-
ColumnInfo
public ColumnInfo(String colname, int coltype, String[] combo, boolean ro)
Creates a column info class for use with the TableView class. The type of column info to be created is : COLUMN_TYPE_CCOMBO- Parameters:
colname- The column namecoltype- The column type (see: COLUMN_TYPE_...)combo- The choices in the combo boxro- true if the column is read-only (you can't type in the combo box, you CAN make a choice)
-
ColumnInfo
public ColumnInfo(String colname, int coltype, boolean num, boolean ro)
Creates a column info class for use with the TableView class.- Parameters:
colname- The column namecoltype- The column type (see: COLUMN_TYPE_...)num- true if the column type is numeric. Use setValueType() to specify the type of numeric: ValueMetaInterface.TYPE_INTEGER is the default.ro- true if the column is read-only.
-
ColumnInfo
public ColumnInfo(String colname, int coltype, boolean num, boolean ro, int width)
Creates a column info class for use with the TableView class.- Parameters:
colname- The column namecoltype- The column type (see: COLUMN_TYPE_...)num- true if the column type is numeric. Use setValueType() to specify the type of numeric: ValueMetaInterface.TYPE_INTEGER is the default.ro- true if the column is read-only.width- The column width
-
ColumnInfo
public ColumnInfo(String colname, int coltype, int fieldTypeColumn)
Creates a column info class for use with the TableView class. The type of column info to be created is : COLUMN_TYPE_FORMAT- Parameters:
colname- The column namecoltype- The column type (see: COLUMN_TYPE_...)fieldTypeColumn- The column that contains the field type (for use when filtering the format combo dropdown)
-
-
Method Detail
-
setToolTip
public void setToolTip(String tip)
-
setReadOnly
public void setReadOnly(boolean ro)
-
setAllignement
public void setAllignement(int allign)
-
setComboValues
public void setComboValues(String[] cv)
-
setButtonText
public void setButtonText(String bt)
-
getName
public String getName()
-
getType
public int getType()
-
getComboValues
public String[] getComboValues()
-
isNumeric
public boolean isNumeric()
- Returns:
- the numeric
-
setNumeric
public void setNumeric(boolean numeric)
- Parameters:
numeric- the numeric to set
-
getToolTip
public String getToolTip()
-
getAllignement
public int getAllignement()
-
isReadOnly
public boolean isReadOnly()
-
getButtonText
public String getButtonText()
-
setSelectionAdapter
public void setSelectionAdapter(org.eclipse.swt.events.SelectionListener sb)
-
getSelectionAdapter
public org.eclipse.swt.events.SelectionListener getSelectionAdapter()
-
hideNegative
public void hideNegative()
-
showNegative
public void showNegative()
-
isNegativeHidden
public boolean isNegativeHidden()
-
getValueMeta
public org.pentaho.di.core.row.ValueMetaInterface getValueMeta()
- Returns:
- the valueMeta
-
setValueMeta
public void setValueMeta(org.pentaho.di.core.row.ValueMetaInterface valueMeta)
- Parameters:
valueMeta- the valueMeta to set
-
isUsingVariables
public boolean isUsingVariables()
- Returns:
- the usingVariables
-
setUsingVariables
public void setUsingVariables(boolean usingVariables)
- Parameters:
usingVariables- the usingVariables to set
-
isPasswordField
public boolean isPasswordField()
- Returns:
- the password
-
setPasswordField
public void setPasswordField(boolean password)
- Parameters:
password- the password to set
-
getFieldTypeColumn
public int getFieldTypeColumn()
-
setFieldTypeColumn
public void setFieldTypeColumn(int fieldTypeColumn)
-
getComboValuesSelectionListener
public ComboValuesSelectionListener getComboValuesSelectionListener()
- Returns:
- the comboValuesSelectionListener
-
setComboValuesSelectionListener
public void setComboValuesSelectionListener(ComboValuesSelectionListener comboValuesSelectionListener)
- Parameters:
comboValuesSelectionListener- the comboValuesSelectionListener to set
-
getDisabledListener
public FieldDisabledListener getDisabledListener()
- Returns:
- the disabledListener
-
setDisabledListener
public void setDisabledListener(FieldDisabledListener disabledListener)
- Parameters:
disabledListener- the disabledListener to set
-
getTextVarButtonSelectionListener
public org.eclipse.swt.events.SelectionListener getTextVarButtonSelectionListener()
-
setTextVarButtonSelectionListener
public void setTextVarButtonSelectionListener(org.eclipse.swt.events.SelectionListener textVarButtonSelectionListener)
-
setRenderTextVarButtonCallback
public void setRenderTextVarButtonCallback(TextVarButtonRenderCallback callback)
-
shouldRenderTextVarButton
public boolean shouldRenderTextVarButton()
-
getWidth
public int getWidth()
-
isAutoResize
public boolean isAutoResize()
- Returns:
- if should be resized to accommodate contents
-
setAutoResize
public void setAutoResize(boolean resize)
If should be resized to accommodate contents. Default istrue.
-
-