public class TableOptions extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MMF_FIELD
Main molecule is a field in at least one record.
|
static int |
MMF_NOT_FIELD
Main molecule is not a field in at least one record.
|
static int |
MMF_UNSET
Not yet decided whether the main molecule is a field or not.
|
static int |
VH_AUTO
Automatic view selection.
|
static int |
VH_GRIDBAG
Molecule matrix view.
|
static int |
VH_SPREADSHEET
Record oriented view.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(ActionListener l)
Adds an action listener.
|
int |
getColumnWidth()
Gets the default column width.
|
int |
getColumnWidth(int i)
Gets the default width of a specified column.
|
String |
getColumnWidthsString()
Gets a parameter string containing column widths.
|
int |
getFieldFontSize()
Gets the field font size.
|
boolean |
getFieldsShown()
Are SDfile fields shown in table?
|
int |
getGenNameFontSize()
Gets the IUPAC name font size.
|
int |
getMainMolFieldness()
Tests whether the main molecule is a field.
|
int |
getMaxCols()
Get maximum value of columns in the table.
|
int |
getMaxRows()
Get maximum value of rows in the table
|
int |
getMaxSize()
Get the maximum number of molecules displayed in the table.
|
int |
getMolNameFontSize()
Gets the molecule name font size.
|
int |
getRowHeight()
Gets the row height.
|
int |
getSelectedFieldCount()
Gets the number of selected fields.
|
String[] |
getSelectedFields()
Get selected fields array which are selected in Table Options dialog box
|
chemaxon.marvin.view.CellType[] |
getSelectedFieldTypes()
Get type array of selected field types.
|
int |
getSMILESFontSize()
Gets the SMILES font size.
|
int |
getStartAt()
Get the index number of the molecule that is the first to be displayed.
|
int |
getViewHandlerType()
Gets the view handler type.
|
void |
initFields()
Initialize field information before update.
|
boolean |
isGenNameShown()
Are IUPAC names shown in the table?
|
boolean |
isMolNameShown()
Are molecule names shown in the table?
|
boolean |
isSingleCellLabelShown()
Tests whether label should be shown for a single cell.
|
boolean |
isSMILESShown()
Are SMILES strings shown in the table?
|
boolean |
isSubsetChangable()
Returns whether startAt and maxSize can be changed.
|
void |
removeActionListener(ActionListener l)
Removes an action listener.
|
void |
setColumnWidth(int w)
Sets the default column width.
|
void |
setColumnWidth(int i,
int w)
Sets the default width of a specified column.
|
void |
setFieldFontSize(int v)
Sets the field font size.
|
void |
setFieldsShown(boolean v)
Show or hide SDfile fields in the table
|
void |
setGenNameFontSize(int v)
Sets the IUPAC name font size.
|
void |
setGenNameShown(boolean v)
Set visibility of IUPAC names.
|
void |
setListFont(Font f) |
void |
setMaxCols(int v)
Set maximum value of columns in the table
|
void |
setMaxRows(int v)
Set maximum value of rows in the table
|
void |
setMaxSize(int n)
Set the maximum number of molecules displayed in the table.
|
void |
setMolNameFontSize(int v)
Sets the molecule name font size.
|
void |
setMolNameShown(boolean v)
Sets visibility of molecule names.
|
void |
setRowHeight(int h)
Sets the row height.
|
void |
setSelectedFields(String[] fields)
Set selected fields array in Table Options dialog box
|
void |
setSingleCellLabelShown(boolean v)
Tests whether label should be shown for a single cell.
|
void |
setSMILESFontSize(int v)
Sets the SMILES font size.
|
void |
setSMILESShown(boolean v)
Set visibility of SMILES strings.
|
void |
setStartAt(int s)
Set the index number of the molecule that is the first to be displayed.
|
void |
setSubsetChangable(boolean b)
Sets whether startAt and maxSize can be changed.
|
void |
setViewHandlerType(int t)
Sets the view handler type.
|
void |
showDialog()
Bring up Table Options dialog box
|
void |
updateFields(MDocument doc)
Update fields of SDF table
|
void |
updateFields(MDocument[] docarr)
Update fields of SDF table
|
public static final int VH_AUTO
public static final int VH_GRIDBAG
public static final int VH_SPREADSHEET
public static final int MMF_UNSET
public static final int MMF_FIELD
public static final int MMF_NOT_FIELD
public void setListFont(Font f)
public void initFields()
public void updateFields(MDocument doc)
doc
- documentpublic void updateFields(MDocument[] docarr)
docarr
- array of molecules in the tablepublic boolean isSubsetChangable()
public void setSubsetChangable(boolean b)
b
- indexpublic int getStartAt()
public void setStartAt(int s)
s
- indexpublic int getMaxSize()
public void setMaxSize(int n)
n
- maximum number of moleculespublic int getViewHandlerType()
VH_AUTO
,
VH_SPREADSHEET
,
VH_GRIDBAG
public void setViewHandlerType(int t)
t
- the view handler typeVH_AUTO
,
VH_SPREADSHEET
,
VH_GRIDBAG
public void setRowHeight(int h)
h
- the row heightpublic int getRowHeight()
public void setColumnWidth(int w)
setColumnWidth(int, int)
is not called, except for column 0.w
- the column widthpublic int getColumnWidth()
public void setColumnWidth(int i, int w)
i
- the column indexw
- widthpublic int getColumnWidth(int i)
i
- the column indexpublic String getColumnWidthsString()
public int getMaxCols()
public void setMaxCols(int v)
v
- maximum value of columnspublic int getMaxRows()
public void setMaxRows(int v)
v
- maximum value of rowspublic boolean isMolNameShown()
true
if molecule names are visible.public void setMolNameShown(boolean v)
v
- true
to make molecule names visiblepublic int getMolNameFontSize()
public void setMolNameFontSize(int v)
v
- the font sizepublic boolean isGenNameShown()
true
if IUPAC names should be visible, false
otherwisepublic void setGenNameShown(boolean v)
v
- true
to show IUPAC names, false
to hide thempublic int getGenNameFontSize()
public void setGenNameFontSize(int v)
v
- the font sizepublic boolean isSMILESShown()
true
if SMILES strings should be visible, false
otherwisepublic void setSMILESShown(boolean v)
v
- true
to show SMILES strings, false
to hide thempublic int getSMILESFontSize()
public void setSMILESFontSize(int v)
v
- the font sizepublic boolean isSingleCellLabelShown()
true
if label is always shown, false
if label is shown only
if more than one cell is presentpublic void setSingleCellLabelShown(boolean v)
v
- true
to show label always, false
to show only if more
than one cell is presentpublic boolean getFieldsShown()
public void setFieldsShown(boolean v)
v
- true to show SDfile fields, false to hide thempublic int getFieldFontSize()
public void setFieldFontSize(int v)
v
- the font sizepublic String[] getSelectedFields()
getSelectedFieldCount()
,
getSelectedFieldTypes()
public int getSelectedFieldCount()
public chemaxon.marvin.view.CellType[] getSelectedFieldTypes()
getSelectedFields()
public int getMainMolFieldness()
MMF_UNSET
, MMF_FIELD
, MMF_NOT_FIELD
or MMF_FIELD
| MMF_NOT_FIELD
public void setSelectedFields(String[] fields)
fields
- name of selected fieldspublic void showDialog()
public void addActionListener(ActionListener l)
l
- the action listenerpublic void removeActionListener(ActionListener l)
l
- the action listener