org.openscience.chimetojmol
Class ChimePanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.openscience.chimetojmol.ChimePanel
- All Implemented Interfaces:
- ActionListener, ItemListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
public class ChimePanel
- extends JPanel
- implements ItemListener, ActionListener
- See Also:
- Serialized Form
|
Method Summary |
void |
actionPerformed(ActionEvent e)
|
private void |
addJmolFiles(String rootDir)
|
private void |
copyDirectory(String level,
File sourceLocation,
File targetLocation,
boolean justChecking)
|
private boolean |
copyFile(String level,
File f1,
File f2,
boolean justChecking)
|
static boolean |
deleteDirectory(File directory)
|
private void |
doBrowse()
|
private void |
doGo()
|
private String |
fixChime(String data,
boolean isHtml)
|
private String |
fixFileName(File f)
|
private String |
fixFileNames(String data,
boolean isHtml)
|
private String |
fixFileNames(String data,
String what,
char term)
|
private String |
getFileContents(File f)
|
(package private) void |
getFileList()
|
(package private) static InputStream |
getResourceStream(String fileName)
|
void |
itemStateChanged(ItemEvent e)
|
private boolean |
justTransferFile(File f1,
File f2,
InputStream in)
|
private void |
log(String string)
|
private boolean |
processFile(String level,
File f1,
File f2,
boolean processHtml,
boolean processChime)
|
private boolean |
putFileContents(File f,
String html)
|
private void |
showProgress()
|
private void |
transferResource(File dir,
String name,
File dest,
String nameOut)
|
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
chimePath
private JTextField chimePath
goButton
private JButton goButton
browseButton
private JButton browseButton
logArea
private JTextArea logArea
logScrollPane
private JScrollPane logScrollPane
chooser
private JFileChooser chooser
oldDir
private File oldDir
pages
private List<File> pages
nDir
private int nDir
nFiles
private int nFiles
checkSubs
private Checkbox checkSubs
checkFilenames
private Checkbox checkFilenames
checkSigned
private Checkbox checkSigned
doSubdirectories
private boolean doSubdirectories
doFixFilenames
private boolean doFixFilenames
doUseSigned
private boolean doUseSigned
myDir
private File myDir
rootDir
private String rootDir
embed1
private static Pattern embed1
embed2
private static Pattern embed2
ChimePanel
ChimePanel()
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformed in interface ActionListener
itemStateChanged
public void itemStateChanged(ItemEvent e)
- Specified by:
itemStateChanged in interface ItemListener
log
private void log(String string)
getFileList
void getFileList()
doGo
private void doGo()
doBrowse
private void doBrowse()
copyDirectory
private void copyDirectory(String level,
File sourceLocation,
File targetLocation,
boolean justChecking)
throws IOException
- Throws:
IOException
addJmolFiles
private void addJmolFiles(String rootDir)
transferResource
private void transferResource(File dir,
String name,
File dest,
String nameOut)
deleteDirectory
public static boolean deleteDirectory(File directory)
fixFileName
private String fixFileName(File f)
showProgress
private void showProgress()
copyFile
private boolean copyFile(String level,
File f1,
File f2,
boolean justChecking)
justTransferFile
private boolean justTransferFile(File f1,
File f2,
InputStream in)
processFile
private boolean processFile(String level,
File f1,
File f2,
boolean processHtml,
boolean processChime)
fixFileNames
private String fixFileNames(String data,
boolean isHtml)
fixFileNames
private String fixFileNames(String data,
String what,
char term)
fixChime
private String fixChime(String data,
boolean isHtml)
- Parameters:
data - isHtml -
- Returns:
- fixed Chime commands
getFileContents
private String getFileContents(File f)
putFileContents
private boolean putFileContents(File f,
String html)
getResourceStream
static InputStream getResourceStream(String fileName)