|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
weka.gui.arffviewer.ArffViewerMainPanel
public class ArffViewerMainPanel
The main panel of the ArffViewer. It has a reference to the menu, that an implementing JFrame only needs to add via the setJMenuBar(JMenuBar) method.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Field Summary | |
---|---|
static int |
DEFAULT_HEIGHT
the default for height |
static int |
DEFAULT_LEFT
the default for left |
static int |
DEFAULT_TOP
the default for top |
static int |
DEFAULT_WIDTH
the default for width |
static int |
HEIGHT
default height |
static int |
WIDTH
default width |
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS |
Constructor Summary | |
---|---|
ArffViewerMainPanel(javax.swing.JFrame parentFrame)
initializes the object |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
invoked when an action occurs |
void |
clearSearch()
clears the search, i.e. |
void |
close()
closes the window, i.e., if the parent is not null and implements the WindowListener interface it calls the windowClosing method |
void |
closeAllFiles()
closes all open files |
void |
closeFile()
closes the current tab |
void |
closeFile(boolean showCancel)
closes the current tab |
void |
copyContent()
copies the content of the selection to the clipboard |
void |
deleteAttribute(boolean multiple)
deletes the current selected Attribute or several chosen ones |
void |
deleteInstance(boolean multiple)
deletes the current selected Instance or several chosen ones |
boolean |
getConfirmExit()
returns the setting of whether to display a confirm messagebox or not on exit |
java.lang.String |
getCurrentFilename()
returns the filename of the current tab |
int |
getCurrentIndex()
returns the currently selected tab index |
ArffPanel |
getCurrentPanel()
returns the currently selected panel |
boolean |
getExitOnClose()
returns TRUE if a System.exit(0) is done on a close |
java.lang.String |
getFilename(int index)
returns the filename of the specified panel |
java.lang.String |
getFrameTitle()
returns the title (incl. |
javax.swing.JMenuBar |
getMenu()
returns the menu bar to be added in a frame |
ArffPanel |
getPanel(int index)
returns the specified panel, null if index is out of bounds |
int |
getPanelCount()
returns the number of panels currently open |
javax.swing.JTabbedPane |
getTabbedPane()
returns the tabbedpane instance |
boolean |
isPanelSelected()
checks whether a panel is currently selected |
void |
loadFile()
loads the specified file into the table |
void |
loadFile(java.lang.String filename)
loads the specified file |
void |
refresh()
validates and repaints the frame |
void |
renameAttribute()
renames the current selected Attribute |
void |
saveFile()
saves the current data into a file |
void |
saveFileAs()
saves the current data into a new file |
void |
search()
searches for a string in the cells |
void |
setConfirmExit(boolean confirm)
whether to present a MessageBox on Exit or not |
void |
setCurrentFilename(java.lang.String filename)
sets the filename of the current tab |
void |
setExitOnClose(boolean value)
whether to do a System.exit(0) on close |
void |
setFilename(int index,
java.lang.String filename)
sets the filename of the specified panel |
java.lang.String |
showAttributes()
displays all the attributes, returns the selected item or NULL if canceled |
void |
showProperties()
displays some properties of the instances |
void |
showValues()
displays all the distinct values for an attribute |
void |
sortInstances()
sorts the current selected attribute |
void |
stateChanged(javax.swing.event.ChangeEvent e)
Invoked when the target of the listener has changed its state. |
java.lang.String |
toString()
returns only the classname |
void |
undo()
undoes the last action |
void |
updateFrameTitle()
sets the title of the parent frame, if one was provided |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
public static final int DEFAULT_LEFT
public static final int DEFAULT_TOP
public static final int WIDTH
public static final int HEIGHT
Constructor Detail |
---|
public ArffViewerMainPanel(javax.swing.JFrame parentFrame)
Method Detail |
---|
public javax.swing.JMenuBar getMenu()
public javax.swing.JTabbedPane getTabbedPane()
public void setConfirmExit(boolean confirm)
confirm
- whether a MessageBox pops up or not to confirm
exitpublic boolean getConfirmExit()
public void setExitOnClose(boolean value)
public boolean getExitOnClose()
public void refresh()
public java.lang.String getFrameTitle()
public void updateFrameTitle()
public int getPanelCount()
public ArffPanel getPanel(int index)
null
if index is out of bounds
public int getCurrentIndex()
public ArffPanel getCurrentPanel()
public boolean isPanelSelected()
public java.lang.String getFilename(int index)
public java.lang.String getCurrentFilename()
public void setFilename(int index, java.lang.String filename)
public void setCurrentFilename(java.lang.String filename)
public void loadFile(java.lang.String filename)
public void loadFile()
public void saveFile()
public void saveFileAs()
public void closeFile()
public void closeFile(boolean showCancel)
showCancel
- whether to show an additional CANCEL button
in the "Want to save changes"-dialogsaveChanges(boolean)
public void closeAllFiles()
public void showProperties()
public void close()
public void undo()
public void copyContent()
public void search()
public void clearSearch()
public void renameAttribute()
public void deleteAttribute(boolean multiple)
public void deleteInstance(boolean multiple)
public void sortInstances()
public java.lang.String showAttributes()
public void showValues()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
public java.lang.String toString()
toString
in class java.awt.Component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |