类 ArffViewerMainPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
weka.gui.arffviewer.ArffViewerMainPanel
- 所有已实现的接口:
ActionListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,ChangeListener
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.
- 版本:
- $Revision: 9892 $
- 作者:
- FracPete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 javax.swing.JComponent
JComponent.AccessibleJComponent
从类继承的嵌套类/接口 java.awt.Component
Component.BaselineResizeBehavior
-
字段概要
字段修饰符和类型字段说明static final int
the default for heightstatic final int
the default for leftstatic final int
the default for topstatic final int
the default for widthstatic final int
default heightstatic final int
default width从类继承的字段 javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
从类继承的字段 java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
从接口继承的字段 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
invoked when an action occursvoid
sets the current selected Attribute as class attribute, i.e.void
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 methodvoid
closes all open filesvoid
closes the current tabvoid
closeFile
(boolean showCancel) closes the current tabvoid
copies the content of the selection to the clipboardvoid
deleteAttribute
(boolean multiple) deletes the current selected Attribute or several chosen onesvoid
deleteInstance
(boolean multiple) deletes the current selected Instance or several chosen onesboolean
returns the setting of whether to display a confirm messagebox or not on exitreturns the filename of the current tabint
returns the currently selected tab indexreturns the currently selected panelboolean
returns TRUE if a System.exit(0) is done on a closegetFilename
(int index) returns the filename of the specified panelreturns the title (incl.getMenu()
returns the menu bar to be added in a framegetPanel
(int index) returns the specified panel,null
if index is out of boundsint
returns the number of panels currently openreturns the parent frame, if it's a JFrame, otherwise nullreturns the parent frame, if it's a JInternalFrame, otherwise nullreturns the tabbedpane instanceboolean
checks whether a panel is currently selectedvoid
loadFile()
loads the specified file into the tablevoid
loads the specified filevoid
refresh()
validates and repaints the framevoid
renames the current selected Attributevoid
saveFile()
saves the current data into a filevoid
saves the current data into a new filevoid
search()
searches for a string in the cellsvoid
setConfirmExit
(boolean confirm) whether to present a MessageBox on Exit or notvoid
setCurrentFilename
(String filename) sets the filename of the current tabvoid
setExitOnClose
(boolean value) whether to do a System.exit(0) on closevoid
setFilename
(int index, String filename) sets the filename of the specified panelvoid
sets the optimal column width for all columnsvoid
sets the new parent framedisplays all the attributes, returns the selected item or NULL if canceledvoid
displays some properties of the instancesvoid
displays all the distinct values for an attributevoid
sorts the current selected attributevoid
Invoked when the target of the listener has changed its state.toString()
returns only the classnamevoid
undo()
undoes the last actionvoid
sets the title of the parent frame, if one was provided从类继承的方法 javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
从类继承的方法 javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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
从类继承的方法 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, transferFocusDownCycle, validate
从类继承的方法 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
-
字段详细资料
-
DEFAULT_WIDTH
public static final int DEFAULT_WIDTHthe default for width- 另请参阅:
-
DEFAULT_HEIGHT
public static final int DEFAULT_HEIGHTthe default for height- 另请参阅:
-
DEFAULT_LEFT
public static final int DEFAULT_LEFTthe default for left- 另请参阅:
-
DEFAULT_TOP
public static final int DEFAULT_TOPthe default for top- 另请参阅:
-
WIDTH
public static final int WIDTHdefault width- 另请参阅:
-
HEIGHT
public static final int HEIGHTdefault height- 另请参阅:
-
-
构造器详细资料
-
ArffViewerMainPanel
initializes the object- 参数:
parentFrame
- the parent frame (JFrame or JInternalFrame)
-
-
方法详细资料
-
getParentFrame
returns the parent frame, if it's a JFrame, otherwise null- 返回:
- the parent frame
-
getParentInternalFrame
returns the parent frame, if it's a JInternalFrame, otherwise null- 返回:
- the parent frame
-
setParent
sets the new parent frame- 参数:
value
- the parent frame
-
getMenu
returns the menu bar to be added in a frame- 返回:
- the menu bar
-
getTabbedPane
returns the tabbedpane instance- 返回:
- the tabbed pane
-
setConfirmExit
public void setConfirmExit(boolean confirm) whether to present a MessageBox on Exit or not- 参数:
confirm
- whether a MessageBox pops up or not to confirm exit
-
getConfirmExit
public boolean getConfirmExit()returns the setting of whether to display a confirm messagebox or not on exit- 返回:
- whether a messagebox is displayed or not
-
setExitOnClose
public void setExitOnClose(boolean value) whether to do a System.exit(0) on close- 参数:
value
- enables/disables a System.exit(0) on close
-
getExitOnClose
public boolean getExitOnClose()returns TRUE if a System.exit(0) is done on a close- 返回:
- true if a System.exit(0) is done on close
-
refresh
public void refresh()validates and repaints the frame -
getFrameTitle
returns the title (incl. filename) for the frame- 返回:
- the frame title
-
updateFrameTitle
public void updateFrameTitle()sets the title of the parent frame, if one was provided -
getPanelCount
public int getPanelCount()returns the number of panels currently open- 返回:
- the number of open panels
-
getPanel
returns the specified panel,null
if index is out of bounds- 参数:
index
- the index of the panel- 返回:
- the panel
-
getCurrentIndex
public int getCurrentIndex()returns the currently selected tab index- 返回:
- the index of the currently selected tab
-
getCurrentPanel
returns the currently selected panel- 返回:
- the currently selected panel
-
isPanelSelected
public boolean isPanelSelected()checks whether a panel is currently selected- 返回:
- true if a panel is currently selected
-
getFilename
returns the filename of the specified panel- 参数:
index
- the index of the panel- 返回:
- the filename for the panel
-
getCurrentFilename
returns the filename of the current tab- 返回:
- the current filename
-
setFilename
sets the filename of the specified panel- 参数:
index
- the index of the panelfilename
- the new filename
-
setCurrentFilename
sets the filename of the current tab- 参数:
filename
- the new filename
-
loadFile
loads the specified file- 参数:
filename
- the file to load
-
loadFile
public void loadFile()loads the specified file into the table -
saveFile
public void saveFile()saves the current data into a file -
saveFileAs
public void saveFileAs()saves the current data into a new file -
closeFile
public void closeFile()closes the current tab -
closeFile
public void closeFile(boolean showCancel) closes the current tab- 参数:
showCancel
- whether to show an additional CANCEL button in the "Want to save changes"-dialog- 另请参阅:
-
saveChanges(boolean)
-
closeAllFiles
public void closeAllFiles()closes all open files -
showProperties
public void showProperties()displays some properties of the instances -
close
public void close()closes the window, i.e., if the parent is not null and implements the WindowListener interface it calls the windowClosing method -
undo
public void undo()undoes the last action -
copyContent
public void copyContent()copies the content of the selection to the clipboard -
search
public void search()searches for a string in the cells -
clearSearch
public void clearSearch()clears the search, i.e. resets the found cells -
renameAttribute
public void renameAttribute()renames the current selected Attribute -
attributeAsClass
public void attributeAsClass()sets the current selected Attribute as class attribute, i.e. it moves it to the end of the attributes -
deleteAttribute
public void deleteAttribute(boolean multiple) deletes the current selected Attribute or several chosen ones- 参数:
multiple
- whether to delete myultiple attributes
-
deleteInstance
public void deleteInstance(boolean multiple) deletes the current selected Instance or several chosen ones- 参数:
multiple
- whether to delete multiple instances
-
sortInstances
public void sortInstances()sorts the current selected attribute -
showAttributes
displays all the attributes, returns the selected item or NULL if canceled- 返回:
- the name of the selected attribute
-
showValues
public void showValues()displays all the distinct values for an attribute -
setOptimalColWidths
public void setOptimalColWidths()sets the optimal column width for all columns -
actionPerformed
invoked when an action occurs- 指定者:
actionPerformed
在接口中ActionListener
- 参数:
e
- the action event
-
stateChanged
Invoked when the target of the listener has changed its state.- 指定者:
stateChanged
在接口中ChangeListener
- 参数:
e
- the change event
-
toString
returns only the classname
-