|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
adams.gui.core.BaseDialog
adams.gui.visualization.instance.LoadDatasetDialog
public class LoadDatasetDialog
A dialog for loading datasets from disk.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JDialog |
|---|
JDialog.AccessibleJDialog |
| Nested classes/interfaces inherited from class java.awt.Dialog |
|---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected JButton |
m_ButtonClose
the Close button. |
protected JButton |
m_ButtonLoad
the Load button. |
protected JButton |
m_ButtonReload
the button for reloading an existing file. |
protected JCheckBox |
m_CheckBoxIncludeDateAttributes
whether to include date attributes. |
protected JCheckBox |
m_CheckBoxIncludeNominalAttributes
whether to include numeric nominal. |
protected JCheckBox |
m_CheckBoxIncludeNumericAttributes
whether to include numeric attributes. |
protected JCheckBox |
m_CheckBoxIncludeRelationalAttributes
whether to include relational attributes. |
protected JCheckBox |
m_CheckBoxIncludeStringAttributes
whether to include string attributes. |
protected JComboBox |
m_ComboBoxClass
the class index. |
protected DefaultComboBoxModel |
m_ComboBoxClassModel
the class index model. |
protected JComboBox |
m_ComboBoxSorting
the sorting index. |
protected DefaultComboBoxModel |
m_ComboBoxSortingModel
the soriting index model. |
protected Range |
m_DefaultAttributeRange
the default range. |
protected Index |
m_DefaultClassIndex
the default class index. |
protected boolean |
m_DefaultIncludeDateAttributes
the default for date attributes. |
protected boolean |
m_DefaultIncludeNominalAttributes
the default for nominal attributes. |
protected boolean |
m_DefaultIncludeNumericAttributes
the default for numeric attributes. |
protected boolean |
m_DefaultIncludeRelationalAttributes
the default for relational attributes. |
protected boolean |
m_DefaultIncludeStringAttributes
the default for string attributes. |
protected Index |
m_DefaultSortIndex
the default sort index. |
protected DatasetFileChooserPanel |
m_FilePanel
for selecting the dataset file. |
protected int[] |
m_Indices
the selected indices. |
protected weka.core.Instances |
m_Instances
the full dataset. |
protected JList |
m_ListAdditionalAttributes
the list of additional attribute values to store in the report. |
protected DefaultListModel |
m_ListAdditionalAttributesModel
the model for the additional attributes. |
protected SearchPanel |
m_SearchPanel
the search panel. |
protected LoadDatasetDialog |
m_Self
the dialog itself. |
protected BaseTabbedPane |
m_TabbedPane
the tabbed pane. |
protected InstanceTable |
m_TableData
the table for displaying the instances. |
protected JTextField |
m_TextAttributeRange
the text field for the attribute range. |
static String |
NO_CLASS
the "no class" constant. |
static String |
NO_SORTING
the "no sorting" constant. |
| Fields inherited from class javax.swing.JDialog |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Dialog |
|---|
DEFAULT_MODALITY_TYPE |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
LoadDatasetDialog(Dialog owner)
Creates a modal dialog. |
|
LoadDatasetDialog(Dialog owner,
String title)
Creates a modal dialog. |
|
LoadDatasetDialog(Frame owner)
Creates a modal dialog. |
|
LoadDatasetDialog(Frame owner,
String title)
Creates a modal dialog. |
|
| Method Summary | |
|---|---|
protected void |
acceptSelection()
Generates the indices. |
protected void |
beforeShow()
Hook method just before the dialog is made visible. |
protected void |
close()
Closes the dialog. |
int[] |
getAdditionalAttributes()
Returns the attributes indices of the original dataset to include in the reports. |
File |
getCurrent()
Returns the current file. |
Range |
getCurrentAttributeRange()
Returns the current range of attributes to use. |
int |
getCurrentClassIndex()
Returns the currently selected class index. |
File |
getCurrentDirectory()
Returns the current directory in use by the file chooser. |
int |
getCurrentSortIndex()
Returns the currently selected sort index. |
weka.core.Instances |
getDataset()
Returns the full dataset, can be null if none loaded. |
String |
getDefaultAttributeRange()
Returns the default range of attributes to use. |
String |
getDefaultClassIndex()
Returns the default class index in use. |
boolean |
getDefaultInclueAttributes(int attType)
Returns the default for the specified attribute type. |
String |
getDefaultSortIndex()
Returns the default sort index in use. |
String |
getFilename()
Returns the currently selected filename, "" if none selected. |
boolean |
getIncludeAttributes(int attType)
Returns whether only numeric attributes should be used. |
int[] |
getIndices()
Returns the indices of the (actual) selected rows. |
protected void |
initGUI()
Initializes the GUI elements. |
protected void |
initialize()
Initializes the members. |
protected void |
loadFile(boolean reload)
Loads the file and displays the IDs. |
protected void |
search()
Performs a search in the fields. |
void |
setCurrent(File value)
Sets the current file. |
void |
setCurrentDirectory(File value)
Sets the current directory to use for the file chooser. |
void |
setDefaultAttributeRange(String value)
Sets the default range of attributes to use. |
void |
setDefaultClassIndex(String value)
Sets the default class index to use. |
void |
setDefaultIncludeAttributes(int attType,
boolean value)
Sets the default for the specified type of attribute. |
void |
setDefaultSortIndex(String value)
Sets the default sort index to use. |
void |
setIncludeAttributes(int attType,
boolean value)
Sets whether only numeric attributes should be used. |
| Methods inherited from class adams.gui.core.BaseDialog |
|---|
afterHide, afterShow, beforeHide, finishInit, setVisible |
| Methods inherited from class java.awt.Dialog |
|---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, show, toBack |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String NO_CLASS
public static final String NO_SORTING
protected LoadDatasetDialog m_Self
protected DatasetFileChooserPanel m_FilePanel
protected JButton m_ButtonReload
protected InstanceTable m_TableData
protected JButton m_ButtonLoad
protected JButton m_ButtonClose
protected SearchPanel m_SearchPanel
protected JComboBox m_ComboBoxClass
protected DefaultComboBoxModel m_ComboBoxClassModel
protected JComboBox m_ComboBoxSorting
protected DefaultComboBoxModel m_ComboBoxSortingModel
protected JList m_ListAdditionalAttributes
protected DefaultListModel m_ListAdditionalAttributesModel
protected JTextField m_TextAttributeRange
protected Range m_DefaultAttributeRange
protected JCheckBox m_CheckBoxIncludeNumericAttributes
protected JCheckBox m_CheckBoxIncludeDateAttributes
protected JCheckBox m_CheckBoxIncludeNominalAttributes
protected JCheckBox m_CheckBoxIncludeStringAttributes
protected JCheckBox m_CheckBoxIncludeRelationalAttributes
protected weka.core.Instances m_Instances
protected int[] m_Indices
protected BaseTabbedPane m_TabbedPane
protected Index m_DefaultClassIndex
protected Index m_DefaultSortIndex
protected boolean m_DefaultIncludeNumericAttributes
protected boolean m_DefaultIncludeDateAttributes
protected boolean m_DefaultIncludeNominalAttributes
protected boolean m_DefaultIncludeStringAttributes
protected boolean m_DefaultIncludeRelationalAttributes
| Constructor Detail |
|---|
public LoadDatasetDialog(Dialog owner)
owner - the owning dialog
public LoadDatasetDialog(Dialog owner,
String title)
owner - the owning dialogtitle - the title of the dialogpublic LoadDatasetDialog(Frame owner)
owner - the owning frame
public LoadDatasetDialog(Frame owner,
String title)
owner - the owning frametitle - the title of the dialog| Method Detail |
|---|
protected void initialize()
initialize in class BaseDialogprotected void initGUI()
initGUI in class BaseDialogpublic int[] getAdditionalAttributes()
public void setDefaultAttributeRange(String value)
value - the rangepublic String getDefaultAttributeRange()
public Range getCurrentAttributeRange()
public void setDefaultClassIndex(String value)
value - the class index, 1-based integer or 'first'/'last',
use empty string for noneIndexpublic String getDefaultClassIndex()
Indexpublic int getCurrentClassIndex()
public void setDefaultSortIndex(String value)
value - the sort index, 1-based integer or 'first'/'last',
use empty string for noneIndexpublic String getDefaultSortIndex()
Indexpublic int getCurrentSortIndex()
public weka.core.Instances getDataset()
public int[] getIndices()
public void setDefaultIncludeAttributes(int attType,
boolean value)
attType - the attribute typevalue - true if to restrict to attribute type by defaultAttributepublic boolean getDefaultInclueAttributes(int attType)
attType - the attribute type
Attribute
public void setIncludeAttributes(int attType,
boolean value)
attType - the attribute typevalue - if true then only numeric attributes will be usedAttributepublic boolean getIncludeAttributes(int attType)
attType - the attribute type
Attributepublic String getFilename()
protected void loadFile(boolean reload)
reload - whether we're loading a new file or just reloading
the current oneprotected void acceptSelection()
protected void search()
protected void close()
protected void beforeShow()
beforeShow in class BaseDialogpublic void setCurrentDirectory(File value)
value - the current directorypublic File getCurrentDirectory()
public void setCurrent(File value)
value - the file to setpublic File getCurrent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||