Package dialog
Class FormatDialog
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
dialog.FormatDialog
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
,RootPaneContainer
,WindowConstants
Convenience class for a data format dialog box.
- Since:
- 2007.02.09
- See Also:
-
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, Window.Type
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
FieldsModifier and TypeFieldDescriptionstatic final int
mode: show all optional fieldsstatic final int
mode: show check box for field names in first recordstatic final int
mode: show message about null valuesstatic final int
mode: show null value characters inputstatic final int
mode: show check box for transaction weightstatic final int
mode: show combo box for train record contentsstatic final int
mode: show check box for tuple weightFields 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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a data format dialog.FormatDialog
(Frame owner) Create a data format dialog.FormatDialog
(Frame owner, String title) Create a data format dialog.FormatDialog
(Frame owner, String title, int mode) Create a data format dialog. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addActionListener
(ActionListener listener) Add an action listener for pressing the 'ok' button.int
addFormatArgs
(String[] cmd) Add format arguments to a command array.int
addFormatArgs
(String[] cmd, int mode) Add format arguments to a command array.util.TableReader
createReader
(File file) Create a table reader configured for the current format.util.TableReader
createReader
(Reader reader) Create a table reader configured for the current format.util.TableWriter
createWriter
(File file) Create a table writer configured for the current format.util.TableWriter
createWriter
(Writer writer) Create a table writer configured for the current format.Get the blank characters.Get the comment characters.Get the field separators.int
getMode()
Get the read/write mode.Get the null value characters.getPanel()
Get the data format panel.Get the record separators.int
Get the read/write mode for tables.int
Get the record contents mode for trains.void
Set the blank characters.void
setComment
(String s) Set the comment characters.void
setFldSeps
(String s) Set the field separators.void
setMode
(int mode) Set the read/write mode.void
Set the null value characters.void
setRecSeps
(String s) Set the record separators.Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBack
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
HEADER
public static final int HEADERmode: show check box for field names in first record- See Also:
-
WEIGHT
public static final int WEIGHTmode: show check box for tuple weight- See Also:
-
NULLCHS
public static final int NULLCHSmode: show null value characters input- See Also:
-
NONULLS
public static final int NONULLSmode: show message about null values- See Also:
-
TAWGT
public static final int TAWGTmode: show check box for transaction weight- See Also:
-
TRAIN
public static final int TRAINmode: show combo box for train record contents- See Also:
-
ALL
public static final int ALLmode: show all optional fields- See Also:
-
-
Constructor Details
-
FormatDialog
public FormatDialog()Create a data format dialog.- Since:
- 2007.02.09 (Christian Borgelt)
-
FormatDialog
Create a data format dialog.- Parameters:
owner
- the component that is to own the dialog box- Since:
- 2007.02.09 (Christian Borgelt)
-
FormatDialog
Create a data format dialog.- Parameters:
owner
- the component that is to own the dialog boxtitle
- the title of the dialog box- Since:
- 2007.02.09 (Christian Borgelt)
-
FormatDialog
Create a data format dialog.- Parameters:
owner
- the component that is to own the dialog boxtitle
- the title of the dialog boxmode
- the mode (additional input selector)- Since:
- 2007.02.09 (Christian Borgelt)
-
-
Method Details
-
addActionListener
Add an action listener for pressing the 'ok' button.- Parameters:
listener
- the listener to add- Since:
- 2007.07.24 (Christian Borgelt)
-
getPanel
Get the data format panel.- Returns:
- the data format panel
- Since:
- 2007.07.24 (Christian Borgelt)
-
getRecSeps
Get the record separators.- Returns:
- the record separators
- Since:
- 2007.05.17 (Christian Borgelt)
-
setRecSeps
Set the record separators.- Parameters:
s
- the record separators- Since:
- 2007.05.21 (Christian Borgelt)
-
getFldSeps
Get the field separators.- Returns:
- the field separators
- Since:
- 2007.05.17 (Christian Borgelt)
-
setFldSeps
Set the field separators.- Parameters:
s
- the field separators- Since:
- 2007.05.21 (Christian Borgelt)
-
getBlanks
Get the blank characters.- Returns:
- the blank characters
- Since:
- 2007.05.17 (Christian Borgelt)
-
setBlanks
Set the blank characters.- Parameters:
s
- the blank characters- Since:
- 2007.05.21 (Christian Borgelt)
-
getNullChars
Get the null value characters.- Returns:
- the null value characters
- Since:
- 2007.05.17 (Christian Borgelt)
-
setNullChars
Set the null value characters.- Parameters:
s
- the null value characters- Since:
- 2007.05.21 (Christian Borgelt)
-
getComment
Get the comment characters.- Returns:
- the comment characters
- Since:
- 2007.05.17 (Christian Borgelt)
-
setComment
Set the comment characters.- Parameters:
s
- the comment characters- Since:
- 2007.05.21 (Christian Borgelt)
-
getTableMode
public int getTableMode()Get the read/write mode for tables.In the returned value the flags
Table.NOHEADER
and/orTable.WEIGHT
may be set, depending on the selection in the dialog panel.- Returns:
- the read/write mode with
Table
flags - Since:
- 2011.08.01 (Christian Borgelt)
-
getTrainMode
public int getTrainMode()Get the record contents mode for trains.- Returns:
- the record contents mode
- Since:
- 2013.11.29 (Christian Borgelt)
-
getMode
public int getMode()Get the read/write mode.In the returned value the flags
FormatPanel.HEADER
and/orFormatPanel.WEIGHT
(orFormatPanel.TAWGT
) may be set, depending on the selection in the dialog box.- Returns:
- the read mode
- Since:
- 2007.02.09 (Christian Borgelt)
-
setMode
public void setMode(int mode) Set the read/write mode.- Parameters:
mode
- the read mode to set- Since:
- 2007.02.09 (Christian Borgelt)
-
createReader
Create a table reader configured for the current format.- Parameters:
file
- the file to create the reader for- Returns:
- the created table reader
- Throws:
IOException
- if a read error occurs- Since:
- 2007.06.07 (Christian Borgelt)
-
createReader
Create a table reader configured for the current format.- Parameters:
reader
- the reader to create the reader from- Returns:
- the created table reader
- Since:
- 2007.05.08 (Christian Borgelt)
-
createWriter
Create a table writer configured for the current format.- Parameters:
file
- the file to create the table writer for- Returns:
- the created table writer
- Throws:
IOException
- if a write error occurs- Since:
- 2007.06.07 (Christian Borgelt)
-
createWriter
Create a table writer configured for the current format.- Parameters:
writer
- the writer to create the table writer from- Returns:
- the created table writer
- Since:
- 2007.05.20 (Christian Borgelt)
-
addFormatArgs
Add format arguments to a command array.- Parameters:
cmd
- the command array to add to- Returns:
- the number of arguments (assumed to be 1 before)
- Since:
- 2007.02.16 (Christian Borgelt)
-
addFormatArgs
Add format arguments to a command array.- Parameters:
cmd
- the command array to add tomode
- the mode (whether to add null value characters etc.)- Returns:
- the number of arguments (assumed to be 1 before)
- Since:
- 2007.02.16 (Christian Borgelt)
-