Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.robrohan.fangorn
Class Ent  view Ent download Ent.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JInternalFrame
                  extended bycom.robrohan.fangorn.Ent
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public class Ent
extends javax.swing.JInternalFrame

This is a transforming window


Nested Class Summary
(package private)  class Ent.DoFind
           
(package private)  class Ent.DoReplace
           
(package private)  class Ent.DoTransform
           
(package private)  class Ent.makeNewXML
           
(package private)  class Ent.makeNewXSLT
           
(package private)  class Ent.nameEnt
           
(package private)  class Ent.parserSetup
           
(package private)  class Ent.SaveSettings
           
(package private)  class Ent.setOutputParams
           
(package private)  class Ent.ShowParserSettings
           
(package private)  class Ent.tidyXML
           
 
Nested classes inherited from class javax.swing.JInternalFrame
javax.swing.JInternalFrame.AccessibleJInternalFrame, javax.swing.JInternalFrame.JDesktopIcon
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  com.robrohan.tools.ConfigFile cff
           
private  javax.swing.JButton cmdCopyLeaf
           
private  javax.swing.JButton cmdCopyPath
           
private  javax.swing.JButton cmdTextView
           
private  javax.swing.JButton cmdTreeView
           
private static java.lang.String CONFIGFILE
           
private  java.lang.String currentXML
           
private  java.lang.String currentXSL
           
private  DocumentChooser dc
           
private  byte entOutput
           
private  com.robrohan.treebeard.Find f
          find dialog
 Fangorn fanHandle
          handle to the main window
private  javax.swing.JFileChooser fileChooser
           
static byte FOP_PREVIEW
          send transform results to the fop preview program
private  javax.swing.JMenuBar jMenuBar
           
private  javax.swing.JScrollPane jScrollPane1
           
private  javax.swing.JSplitPane jSplitPane1
           
private  javax.swing.JSplitPane jSplitPane2
           
private  javax.swing.JTabbedPane jTabbedPane1
           
private  javax.swing.JToolBar jToolMerge
           
private  javax.swing.JToolBar JToolXML
           
private  javax.swing.JToolBar jToolXSLT
           
private  javax.swing.ImageIcon merge_icon
           
private  javax.swing.JMenu mnuEdit
           
private  javax.swing.JMenu mnuEntTools
           
private  javax.swing.JMenu mnuFile
           
private  javax.swing.JMenu mnuTools
           
private  com.robrohan.treebeard.OutputSetup os
          output setup dialog
private  javax.swing.JPanel panBottom
           
private  javax.swing.JPanel panCenter
           
private  javax.swing.JPanel panDocuments
           
private  javax.swing.JPanel panLeft
           
private  javax.swing.JPanel panoutput
           
private  javax.swing.JPanel panRight
           
private  javax.swing.JPanel panTop
           
 javax.swing.JDesktopPane parentHandle
          handle to the desktop pane
static byte PDF_SAVE
          send transform results to a pdf file on disk
static byte PLAIN_HTML
          send transform results to the plain text / html pane
static byte PLAIN_SAVE
          send transform results to a plain text file
private  java.lang.String redirectFileName
           
static byte RUN_EXTERNAL
          send transform results to an external program
private  com.robrohan.treebeard.Settings settings
           
static javax.swing.JScrollPane sp
          used in treeview
private  javax.swing.ImageIcon tidy_icon
           
static byte TO_ENT
          send transform results to a new Ent
private  javax.swing.JScrollPane TreeScrollPane
           
private  com.robrohan.treebeard.TreeView treeview
           
private  com.robrohan.treebeard.TreeTransform tt
           
private  com.robrohan.editorkit.XMLEditorPane txtOutput
           
private  javax.swing.JEditorPane txtOutputHTML
           
private  com.robrohan.editorkit.XMLEditorPane txtXML
           
private  com.robrohan.editorkit.XMLEditorPane txtXSLT
           
static Thinker wait
          handle to the thinker object (please wait)
private  com.robrohan.treebeard.XMLSetup xs
          xml setup dialog
 
Fields inherited from class javax.swing.JInternalFrame
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_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 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
Ent(java.lang.String title, boolean resizable, boolean closeable, boolean maximizable, boolean iconifiable)
          Creates a new Ent
 
Method Summary
private  java.lang.String applyLibStyleSheet(java.lang.String xslFileName, java.lang.String XML)
           
 void buildXMLTools()
          setup the xml kits
private  void cmdCopyLeafActionPerformed(java.awt.event.ActionEvent evt)
           
private  void cmdCopyPathActionPerformed(java.awt.event.ActionEvent evt)
           
private  void cmdTextViewActionPerformed(java.awt.event.ActionEvent evt)
           
private  void cmdTreeViewActionPerformed(java.awt.event.ActionEvent evt)
           
 void copyNode()
          Moves the selected tree leaf in the xml document to the xslt document.
 void copyPath()
          Moves the selected tree path in the xml document to the xslt document.
private  void createNewXML()
           
private  void createNewXSLT()
           
private  void doTidy()
           
 com.robrohan.editorkit.XMLEditorPane getXMLPane()
           
 com.robrohan.editorkit.XMLEditorPane getXSLTPane()
           
private  void initComponents()
          This method is called from within the constructor to initialize the form.
 boolean isEnt()
          if this is an ent (used by the manager)
private  void jSplitPane1ComponentResized(java.awt.event.ComponentEvent evt)
           
private  void loadTemplateFile()
           
 void parserSettings()
          envokes the xml / xslt parser settings dialog for this ent
 void readSettings()
          Sets the xml xslt parser settings from the settings object
 void sendResults()
           
 void setToTextView()
          Sets the xml pane to the plain text instead of the treeview view
 boolean setToTreeView()
          Sets the xml pane to the treeview instead of the plain text view
private  void setTreeView(boolean on)
           
 void setXMLText(java.lang.String newText)
          Sets the xml pane's text to the passed string
 void setXSLTText(java.lang.String newText)
          Sets the xslt pane's text to the passed string
private  void transform()
           
 
Methods inherited from class javax.swing.JInternalFrame
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, show, toBack, toFront, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, 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, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONFIGFILE

private static final java.lang.String CONFIGFILE
See Also:
Constant Field Values

PLAIN_HTML

public static final byte PLAIN_HTML
send transform results to the plain text / html pane

See Also:
Constant Field Values

TO_ENT

public static final byte TO_ENT
send transform results to a new Ent

See Also:
Constant Field Values

FOP_PREVIEW

public static final byte FOP_PREVIEW
send transform results to the fop preview program

See Also:
Constant Field Values

PDF_SAVE

public static final byte PDF_SAVE
send transform results to a pdf file on disk

See Also:
Constant Field Values

RUN_EXTERNAL

public static final byte RUN_EXTERNAL
send transform results to an external program

See Also:
Constant Field Values

PLAIN_SAVE

public static final byte PLAIN_SAVE
send transform results to a plain text file

See Also:
Constant Field Values

redirectFileName

private java.lang.String redirectFileName

entOutput

private byte entOutput

cff

private com.robrohan.tools.ConfigFile cff

currentXML

private java.lang.String currentXML

currentXSL

private java.lang.String currentXSL

f

private com.robrohan.treebeard.Find f
find dialog


xs

private com.robrohan.treebeard.XMLSetup xs
xml setup dialog


os

private com.robrohan.treebeard.OutputSetup os
output setup dialog


dc

private DocumentChooser dc

tt

private com.robrohan.treebeard.TreeTransform tt

txtXML

private com.robrohan.editorkit.XMLEditorPane txtXML

txtXSLT

private com.robrohan.editorkit.XMLEditorPane txtXSLT

txtOutput

private com.robrohan.editorkit.XMLEditorPane txtOutput

treeview

private com.robrohan.treebeard.TreeView treeview

TreeScrollPane

private javax.swing.JScrollPane TreeScrollPane

settings

private com.robrohan.treebeard.Settings settings

merge_icon

private javax.swing.ImageIcon merge_icon

tidy_icon

private javax.swing.ImageIcon tidy_icon

parentHandle

public javax.swing.JDesktopPane parentHandle
handle to the desktop pane


fanHandle

public Fangorn fanHandle
handle to the main window


wait

public static Thinker wait
handle to the thinker object (please wait)


sp

public static javax.swing.JScrollPane sp
used in treeview


jScrollPane1

private javax.swing.JScrollPane jScrollPane1

mnuTools

private javax.swing.JMenu mnuTools

panLeft

private javax.swing.JPanel panLeft

txtOutputHTML

private javax.swing.JEditorPane txtOutputHTML

panoutput

private javax.swing.JPanel panoutput

jSplitPane2

private javax.swing.JSplitPane jSplitPane2

JToolXML

private javax.swing.JToolBar JToolXML

jSplitPane1

private javax.swing.JSplitPane jSplitPane1

panRight

private javax.swing.JPanel panRight

panTop

private javax.swing.JPanel panTop

cmdTreeView

private javax.swing.JButton cmdTreeView

fileChooser

private javax.swing.JFileChooser fileChooser

panBottom

private javax.swing.JPanel panBottom

cmdCopyPath

private javax.swing.JButton cmdCopyPath

panDocuments

private javax.swing.JPanel panDocuments

cmdTextView

private javax.swing.JButton cmdTextView

mnuEdit

private javax.swing.JMenu mnuEdit

mnuEntTools

private javax.swing.JMenu mnuEntTools

panCenter

private javax.swing.JPanel panCenter

jMenuBar

private javax.swing.JMenuBar jMenuBar

jToolXSLT

private javax.swing.JToolBar jToolXSLT

jToolMerge

private javax.swing.JToolBar jToolMerge

cmdCopyLeaf

private javax.swing.JButton cmdCopyLeaf

jTabbedPane1

private javax.swing.JTabbedPane jTabbedPane1

mnuFile

private javax.swing.JMenu mnuFile
Constructor Detail

Ent

public Ent(java.lang.String title,
           boolean resizable,
           boolean closeable,
           boolean maximizable,
           boolean iconifiable)
Creates a new Ent

Method Detail

buildXMLTools

public void buildXMLTools()
setup the xml kits


sendResults

public void sendResults()

setXMLText

public void setXMLText(java.lang.String newText)
Sets the xml pane's text to the passed string


setXSLTText

public void setXSLTText(java.lang.String newText)
Sets the xslt pane's text to the passed string


initComponents

private void initComponents()
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.


jSplitPane1ComponentResized

private void jSplitPane1ComponentResized(java.awt.event.ComponentEvent evt)

cmdCopyLeafActionPerformed

private void cmdCopyLeafActionPerformed(java.awt.event.ActionEvent evt)

cmdCopyPathActionPerformed

private void cmdCopyPathActionPerformed(java.awt.event.ActionEvent evt)

cmdTextViewActionPerformed

private void cmdTextViewActionPerformed(java.awt.event.ActionEvent evt)

cmdTreeViewActionPerformed

private void cmdTreeViewActionPerformed(java.awt.event.ActionEvent evt)

setTreeView

private void setTreeView(boolean on)

setToTreeView

public boolean setToTreeView()
Sets the xml pane to the treeview instead of the plain text view


setToTextView

public void setToTextView()
Sets the xml pane to the plain text instead of the treeview view


copyPath

public void copyPath()
Moves the selected tree path in the xml document to the xslt document. (when one clicks the "branch" button, used to build xpaths)


copyNode

public void copyNode()
Moves the selected tree leaf in the xml document to the xslt document. (when one clicks the "leaf" button, used to build xpaths)


doTidy

private void doTidy()

applyLibStyleSheet

private java.lang.String applyLibStyleSheet(java.lang.String xslFileName,
                                            java.lang.String XML)

transform

private void transform()

createNewXML

private void createNewXML()

loadTemplateFile

private void loadTemplateFile()

createNewXSLT

private void createNewXSLT()

getXMLPane

public com.robrohan.editorkit.XMLEditorPane getXMLPane()

getXSLTPane

public com.robrohan.editorkit.XMLEditorPane getXSLTPane()

isEnt

public boolean isEnt()
if this is an ent (used by the manager)


parserSettings

public void parserSettings()
envokes the xml / xslt parser settings dialog for this ent


readSettings

public void readSettings()
Sets the xml xslt parser settings from the settings object