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 int
COLUMN_TYPE_BUTTON
static int
COLUMN_TYPE_CCOMBO
static int
COLUMN_TYPE_FORMAT
static int
COLUMN_TYPE_ICON
static int
COLUMN_TYPE_NONE
static int
COLUMN_TYPE_TEXT
static int
COLUMN_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 int
getAllignement()
String
getButtonText()
String[]
getComboValues()
ComboValuesSelectionListener
getComboValuesSelectionListener()
FieldDisabledListener
getDisabledListener()
int
getFieldTypeColumn()
String
getName()
org.eclipse.swt.events.SelectionListener
getSelectionAdapter()
org.eclipse.swt.events.SelectionListener
getTextVarButtonSelectionListener()
String
getToolTip()
int
getType()
org.pentaho.di.core.row.ValueMetaInterface
getValueMeta()
int
getWidth()
void
hideNegative()
boolean
isAutoResize()
boolean
isNegativeHidden()
boolean
isNumeric()
boolean
isPasswordField()
boolean
isReadOnly()
boolean
isUsingVariables()
void
setAllignement(int allign)
void
setAutoResize(boolean resize)
If should be resized to accommodate contents.void
setButtonText(String bt)
void
setCombovalsSupplier(Supplier<String[]> combovalsSupplier)
void
setComboValues(String[] cv)
void
setComboValuesSelectionListener(ComboValuesSelectionListener comboValuesSelectionListener)
void
setDisabledListener(FieldDisabledListener disabledListener)
void
setFieldTypeColumn(int fieldTypeColumn)
void
setNumeric(boolean numeric)
void
setPasswordField(boolean password)
void
setReadOnly(boolean ro)
void
setRenderTextVarButtonCallback(TextVarButtonRenderCallback callback)
void
setSelectionAdapter(org.eclipse.swt.events.SelectionListener sb)
void
setTextVarButtonSelectionListener(org.eclipse.swt.events.SelectionListener textVarButtonSelectionListener)
void
setToolTip(String tip)
void
setUsingVariables(boolean usingVariables)
void
setValueMeta(org.pentaho.di.core.row.ValueMetaInterface valueMeta)
boolean
shouldRenderTextVarButton()
void
showNegative()
String
toString()
-
-
-
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
.
-
-