|
|||||||||
| 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
org.ceryle.ui.FileExistsDialog
public class FileExistsDialog
Extends JDialog providing a dialog box to be displayed when there is to be a document comparison, such as when a file exists on saving. The default dialog box provides seven buttons, each of which can be hidden:
getSelected() method returns an int indicating which action was chosen.
| Nested Class Summary | |
|---|---|
class |
FileExistsDialog.DialogDisposer
|
| Nested classes/interfaces inherited from class javax.swing.JDialog |
|---|
JDialog.AccessibleJDialog |
| Nested classes/interfaces inherited from class java.awt.Dialog |
|---|
Dialog.AccessibleAWTDialog |
| 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.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
ACTION_AUTOSKIP
Returned constant indicating 'Auto Skip.' |
static int |
ACTION_CANCEL
Returned constant indicating 'Cancel the operation.' |
static int |
ACTION_OVERWRITE
Returned constant indicating 'Overwrite.' |
static int |
ACTION_OVERWRITE_ALL
Returned constant indicating 'Overwrite All.' |
static int |
ACTION_PROPOSE
Returned constant indicating 'Propose Rename.' |
static int |
ACTION_RENAME
Returned constant indicating 'Rename.' |
static int |
ACTION_SKIP
Returned constant indicating 'Skip.' |
protected JButton |
btn_autoskip
|
protected JButton |
btn_cancel
|
protected JButton |
btn_overwrite
|
protected JButton |
btn_overwrite_all
|
protected JButton |
btn_propose
|
protected JButton |
btn_rename
|
protected JButton |
btn_skip
|
| Fields inherited from class javax.swing.JDialog |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| 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 | |
|---|---|
FileExistsDialog()
Constructor for a modal dialog box for selecting amongst a group of dialog buttons. |
|
| Method Summary | |
|---|---|
JPanel |
createCenterPanel()
Returns the center panel containing the comparison view. |
String |
formatSize(int size)
Returns a file size string modified by either 'KB' or 'MB', as appropriate. |
int |
getSelected()
Returns an int indicating which button was selected. |
void |
setButtonsVisible(boolean rename,
boolean propose,
boolean skip,
boolean autoskip,
boolean overwrite,
boolean overwriteall)
Sets the visibility of the first six buttons based on the supplied boolean values. |
void |
setNorthFile(File north)
Sets the north panel metadata from the provided File to allow comparison. |
void |
setNorthMessage(String message)
Sets the north panel message to the provided String. |
void |
setNorthXNode(String cid,
String nid,
XNode xnode)
Sets the north panel metadata from the provided XNode to allow comparison. |
void |
setSouthDocument(MetadataPanel meta)
Sets the south panel information from the supplied MetadataPanel to allow comparison of the current document. |
void |
setSouthFile(File south)
Sets the south panel file information to allow comparison of the provided Files. |
void |
setSouthMessage(String message)
Sets the south panel message to the provided String. |
void |
setSouthXNode(String cid,
String nid,
XNode xnode,
String systemId)
Sets the south panel metadata from the provided XNode to allow comparison. |
| Methods inherited from class java.awt.Dialog |
|---|
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ACTION_CANCEL
public static final int ACTION_OVERWRITE_ALL
public static final int ACTION_OVERWRITE
public static final int ACTION_SKIP
public static final int ACTION_AUTOSKIP
public static final int ACTION_PROPOSE
public static final int ACTION_RENAME
protected JButton btn_rename
protected JButton btn_propose
protected JButton btn_skip
protected JButton btn_autoskip
protected JButton btn_overwrite
protected JButton btn_overwrite_all
protected JButton btn_cancel
| Constructor Detail |
|---|
public FileExistsDialog()
| Method Detail |
|---|
public int getSelected()
ACTION_RENAME, ACTION_PROPOSE, ACTION_SKIP,
ACTION_AUTOSKIP, ACTION_OVERWRITE, ACTION_OVERWRITE_ALL,
and ACTION_CANCEL (-1).
public String formatSize(int size)
public void setNorthMessage(String message)
public void setNorthFile(File north)
public void setNorthXNode(String cid,
String nid,
XNode xnode)
public void setSouthMessage(String message)
public void setSouthFile(File south)
public void setSouthDocument(MetadataPanel meta)
public void setSouthXNode(String cid,
String nid,
XNode xnode,
String systemId)
The south XNode is used to display an XNode being imported or otherwise proposed as a replacement.
public void setButtonsVisible(boolean rename,
boolean propose,
boolean skip,
boolean autoskip,
boolean overwrite,
boolean overwriteall)
public JPanel createCenterPanel()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||