wt.clients.beans.contentholder
Class FilePropertiesDialog

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended bywt.clients.beans.contentholder.FilePropertiesDialog
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

class FilePropertiesDialog
extends Dialog


Nested Class Summary
private  class FilePropertiesDialog.ActionThread
           
(package private)  class FilePropertiesDialog.SymAction
           
(package private)  class FilePropertiesDialog.SymKey
           
(package private)  class FilePropertiesDialog.SymWindow
           
 
Nested classes inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog
 
Nested classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
(package private)  Button applyButton
           
(package private)  Panel buttonPanel
           
(package private)  Button cancelButton
           
private  Hashtable constraintsHashtable
           
private  ContentHolder contentHolder
           
private  ThreadGroup contextGroup
           
private  Object contextLock
           
static int CREATE
           
private static boolean DEBUG
          Flag used to provide debugging messages.
(package private)  boolean fComponentsAdjusted
           
private  ApplicationData file
           
(package private)  Label fileNameLabel
           
(package private)  Label fileNameValue
           
(package private)  Label filePathLabel
           
(package private)  Label filePathValue
           
(package private)  Choice formatChoiceBox
           
(package private)  Label formatLabel
           
private  Vector formatNames
           
protected static int GET_FILE
           
(package private)  Button getFileButton
           
private static String HELP_TARGET
          Defined constant String which defines the name of the browser window to launch online help in.
(package private)  Button helpButton
           
private  HelpContext helpContext
           
private  HelpSystem helpSystem
           
(package private)  symantec.itools.awt.shape.HorizontalLine horizontalLine1
           
protected static int INIT_FIELDS
           
protected static int INIT_FORMATS
           
private  boolean intentToUpdate
           
private  Vector listeners
           
private  int mode
           
(package private)  Label modifiedByLabel
           
(package private)  Label modifiedByValue
           
(package private)  Label modifiedDateLabel
           
(package private)  Label modifiedOnValue
           
(package private)  Button okButton
           
private  Applet parentApplet
           
private  Frame parentFrame
           
private static String RESOURCE
           
private static ResourceBundle resources
           
(package private)  Label sizeLabel
           
(package private)  Label sizeValue
           
static int UPDATE
           
private static String versionID
           
static int VIEW
           
private  int waitingOnContext
           
 
Fields inherited from class java.awt.Dialog
 
Fields inherited from class java.awt.Window
 
Fields inherited from class java.awt.Container
 
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
 
Constructor Summary
FilePropertiesDialog(Frame parent, boolean modal)
           
FilePropertiesDialog(Frame parent, String title, boolean modal)
           
 
Method Summary
 void addContentItemListener(ContentItemListener l)
           
 void addNotify()
           
(package private)  void applyButton_Action(ActionEvent event)
           
(package private)  void applyButton_KeyPress(KeyEvent event)
           
(package private)  void cancelButton_Action(ActionEvent event)
           
(package private)  void cancelButton_KeyPress(KeyEvent event)
           
(package private)  void Dialog1_WindowClosing(WindowEvent event)
           
private  void downloadFile()
           
private  void enableActions(boolean enable)
           
private  void enableModification(boolean enable)
           
private  String formatDate(Date time)
           
 ContentHolder getContentHolder()
           
private  WTContext getContext()
           
 ApplicationData getFile()
           
(package private)  void getFileButton_Action(ActionEvent event)
           
(package private)  void getFileButton_KeyPressed(KeyEvent event)
           
private  String getFileSize(ApplicationData file)
           
private  String getLocalizedMessage(String key, Object[] params)
           
 int getMode()
           
 Applet getParentApplet()
           
 Frame getParentFrame()
          Gets the parent Frame of the panel.
(package private)  void helpButton_ActionPerformed(ActionEvent event)
           
(package private)  void helpButton_KeyPressed(KeyEvent event)
           
private  void initFormatChoices()
           
private  void initFormatNames()
           
private  void initHelpSystem()
           
private  void initMode()
           
private  void initResources()
           
 boolean isIntentToUpdate()
           
private  void localize()
           
private  void notifyContentItemListeners(ContentItemEvent evt)
           
(package private)  void okButton_Action(ActionEvent event)
           
(package private)  void okButton_KeyPress(KeyEvent event)
           
private  void populateConstraintsHashtable()
          Populate the Hashtable with the GridBagConstraints of the components that are to be added and removed from the dialog.
private  void processApplyCommand()
           
private  void processGetCommand()
           
private  void processHelpCommand()
           
private  void processOkCommand()
           
 void removeContentItemListeners(ContentItemListener l)
           
private  float roundToTwoDecimals(float number)
           
private  void selectFormat(String format)
           
 void setContentHolder(ContentHolder content_holder)
           
 void setFile(ApplicationData file)
           
private  void setFocus()
           
 void setIntentToUpdate(boolean update)
           
 void setMode(int mode)
           
 void setParentApplet(Applet parent_applet)
           
 void show()
           
private  void showMessageDialog(String message, boolean modal)
           
private  void showModificationInfo(boolean show)
           
private  void storeConstraints(Container container, Component component)
           
private  void updateColors(Color color)
           
private  boolean updateFileFormat()
           
private  void uploadFile()
          Deprecated. replaced by downloadFile
 
Methods inherited from class java.awt.Dialog
dispose, getAccessibleContext, getTitle, hide, isModal, isResizable, isUndecorated, paramString, setModal, setResizable, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, 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, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

versionID

private static final String versionID
See Also:
Constant Field Values

fComponentsAdjusted

boolean fComponentsAdjusted

fileNameLabel

Label fileNameLabel

fileNameValue

Label fileNameValue

filePathLabel

Label filePathLabel

filePathValue

Label filePathValue

formatLabel

Label formatLabel

formatChoiceBox

Choice formatChoiceBox

sizeLabel

Label sizeLabel

sizeValue

Label sizeValue

modifiedDateLabel

Label modifiedDateLabel

modifiedOnValue

Label modifiedOnValue

modifiedByLabel

Label modifiedByLabel

modifiedByValue

Label modifiedByValue

getFileButton

Button getFileButton

horizontalLine1

symantec.itools.awt.shape.HorizontalLine horizontalLine1

buttonPanel

Panel buttonPanel

okButton

Button okButton

applyButton

Button applyButton

cancelButton

Button cancelButton

helpButton

Button helpButton

DEBUG

private static boolean DEBUG
Flag used to provide debugging messages.


CREATE

public static final int CREATE
See Also:
Constant Field Values

UPDATE

public static final int UPDATE
See Also:
Constant Field Values

VIEW

public static final int VIEW
See Also:
Constant Field Values

INIT_FIELDS

protected static final int INIT_FIELDS
See Also:
Constant Field Values

INIT_FORMATS

protected static final int INIT_FORMATS
See Also:
Constant Field Values

GET_FILE

protected static final int GET_FILE
See Also:
Constant Field Values

HELP_TARGET

private static final String HELP_TARGET
Defined constant String which defines the name of the browser window to launch online help in.

See Also:
Constant Field Values

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

resources

private static ResourceBundle resources

file

private ApplicationData file

contentHolder

private ContentHolder contentHolder

parentApplet

private Applet parentApplet

parentFrame

private Frame parentFrame

listeners

private Vector listeners

formatNames

private Vector formatNames

mode

private int mode

constraintsHashtable

private Hashtable constraintsHashtable

contextGroup

private ThreadGroup contextGroup

helpSystem

private HelpSystem helpSystem

helpContext

private HelpContext helpContext

intentToUpdate

private boolean intentToUpdate

contextLock

private Object contextLock

waitingOnContext

private int waitingOnContext
Constructor Detail

FilePropertiesDialog

public FilePropertiesDialog(Frame parent,
                            boolean modal)

FilePropertiesDialog

public FilePropertiesDialog(Frame parent,
                            String title,
                            boolean modal)
Method Detail

addNotify

public void addNotify()

show

public void show()

Dialog1_WindowClosing

void Dialog1_WindowClosing(WindowEvent event)

initResources

private void initResources()

initHelpSystem

private void initHelpSystem()

localize

private void localize()

cancelButton_Action

void cancelButton_Action(ActionEvent event)

setFile

public void setFile(ApplicationData file)

getFile

public ApplicationData getFile()

setContentHolder

public void setContentHolder(ContentHolder content_holder)

getContentHolder

public ContentHolder getContentHolder()

setIntentToUpdate

public void setIntentToUpdate(boolean update)

isIntentToUpdate

public boolean isIntentToUpdate()

setParentApplet

public void setParentApplet(Applet parent_applet)

getParentApplet

public Applet getParentApplet()

getParentFrame

public Frame getParentFrame()
Gets the parent Frame of the panel. The parent frame, if set, is used in displaying message dialogs. If the parent frame has not been explicitly set, but the parent applet has been explicitly set, this method will try to retrieve a Frame from the parent applet.

Returns:
the Frame parent
See Also:
#setParentFrame, setParentApplet(java.applet.Applet)

setMode

public void setMode(int mode)

getMode

public int getMode()

addContentItemListener

public void addContentItemListener(ContentItemListener l)

removeContentItemListeners

public void removeContentItemListeners(ContentItemListener l)

initMode

private void initMode()

setFocus

private void setFocus()

showModificationInfo

private void showModificationInfo(boolean show)

enableModification

private void enableModification(boolean enable)

initFormatNames

private void initFormatNames()

initFormatChoices

private void initFormatChoices()

getContext

private WTContext getContext()

getFileButton_Action

void getFileButton_Action(ActionEvent event)

processGetCommand

private void processGetCommand()

downloadFile

private void downloadFile()

uploadFile

private void uploadFile()
Deprecated. replaced by downloadFile

Downloads the file displayed by this dialog.


selectFormat

private void selectFormat(String format)

enableActions

private void enableActions(boolean enable)

updateFileFormat

private boolean updateFileFormat()
                          throws WTContentHolderException,
                                 WTPropertyVetoException,
                                 WTException
Throws:
WTContentHolderException
WTPropertyVetoException
WTException

okButton_Action

void okButton_Action(ActionEvent event)

processOkCommand

private void processOkCommand()

processApplyCommand

private void processApplyCommand()

showMessageDialog

private void showMessageDialog(String message,
                               boolean modal)

notifyContentItemListeners

private void notifyContentItemListeners(ContentItemEvent evt)

applyButton_Action

void applyButton_Action(ActionEvent event)

cancelButton_KeyPress

void cancelButton_KeyPress(KeyEvent event)

okButton_KeyPress

void okButton_KeyPress(KeyEvent event)

applyButton_KeyPress

void applyButton_KeyPress(KeyEvent event)

getLocalizedMessage

private String getLocalizedMessage(String key,
                                   Object[] params)

formatDate

private String formatDate(Date time)

helpButton_ActionPerformed

void helpButton_ActionPerformed(ActionEvent event)

processHelpCommand

private void processHelpCommand()

helpButton_KeyPressed

void helpButton_KeyPressed(KeyEvent event)

getFileButton_KeyPressed

void getFileButton_KeyPressed(KeyEvent event)

updateColors

private void updateColors(Color color)

getFileSize

private String getFileSize(ApplicationData file)

roundToTwoDecimals

private float roundToTwoDecimals(float number)

populateConstraintsHashtable

private void populateConstraintsHashtable()
Populate the Hashtable with the GridBagConstraints of the components that are to be added and removed from the dialog. This method is necessary to work around the but in IE where 'setVisible(false)' does not work.


storeConstraints

private void storeConstraints(Container container,
                              Component component)