com.infoengine.modeler.UI
Class EditorPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.infoengine.modeler.ModelerPanel
                      extended bycom.infoengine.modeler.UI.EditorPanel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class EditorPanel
extends ModelerPanel

See Also:
Serialized Form

Nested Class Summary
(package private)  class EditorPanel.PageTreeSelectionListener
          handles changes when the selection the design tree changes...
(package private)  class EditorPanel.UndoHandler
          internal class that keeps the undo manager and document state up to date.
 
Nested classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
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
private  boolean ambiguousTag
           
(package private)  BorderLayout borderLayout1
           
(package private)  BorderLayout borderLayout2
           
(package private)  BorderLayout borderLayout3
           
(package private)  BorderLayout borderLayout4
           
(package private)  Timer caretTimer
           
private  boolean changed
           
private  Tag currentTag
           
private  TagWizard currentTagWizard
           
(package private)  JPanel DesignPanel
           
(package private)  JSplitPane DesignSplitPane
           
(package private)  PageTree DesignTree
           
(package private)  Object EDIT_LOCK
           
(package private)  JMenuItem EditMenuItem
           
(package private)  JPopupMenu EditorPopupMenu
           
(package private)  JTabbedPane EditorTabbedPane
           
private  int editSelectionLength
           
private  int editSelectionStart
           
private  TaskExecutionPanel executorPanel
           
(package private)  JLabel FileNameLabel
           
private  IOManager ioManager
           
(package private)  JLabel LineColumnLabel
           
private  EditorContainer myContainer
           
private  MainPanel myMainPanel
           
(package private)  TagInsightKeyListener myTagInsightListener
           
(package private)  JPanel SourcePanel
           
(package private)  JScrollPane SourceScrollPane
           
(package private)  JTextComponent SourceTextArea
           
private  SourceTree sourceTree
           
(package private)  JPanel StatusPanel
           
private  boolean task
           
(package private)  JScrollPane TreeScrollPane
           
(package private)  UndoManager undoM
           
(package private)  JList VDBList
           
(package private)  JScrollPane VDBScrollPane
           
 
Fields inherited from class javax.swing.JPanel
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
EditorPanel()
          no arg construct kept for JBuilder designer should never be used otherwise...
EditorPanel(EditorContainer ec, MainPanel mp, boolean t)
           
 
Method Summary
(package private)  boolean canRedo()
          is there anything that can be redone?
(package private)  boolean canUndo()
          is there anything that can be undone?
private  void caretInTag()
           
private  void checkDrop()
           
private  void checkTaglib(JSPTag jt)
          single out taglib JSP tags to set up associations...
(package private)  void checkTaglibs()
          package so code insight can access...
(package private)  void copy()
          copy selection to clipboard
private  boolean cursorInEditableTag()
           
(package private)  void cut()
          cut selection to clipboard
(package private)  void DesignTree_mouseClicked(MouseEvent e)
          mouse clicked in the design tree...
(package private)  void edit()
           
private  boolean editableText(String text)
           
(package private)  void EditMenuItem_actionPerformed(ActionEvent e)
          user selected the "Edit" item from the popup menu
(package private)  void EditorTabbedPane_stateChanged(ChangeEvent e)
          tabbed pane event handler (switch from design to source mode) KEEP?
(package private)  String getAbsoluteName()
           
private  String getIndent(int from)
          return the indent of the line containing a specific caret position
(package private)  IOManager getIOManager()
           
private  Dropable getParentDropable()
          get a Dropable item from the parent object
(package private)  String getRelativeName()
           
 String getSource()
           
 JTextComponent getTextComponent()
           
(package private)  void goTo()
          preset goto dialog
(package private)  void goToLine(int lineNo)
          move the cursor to a specific line number
(package private)  boolean hasChanged()
          has the internal document changed?
private  void insert(int offset, String string)
           
(package private)  boolean isJSP()
          does this Panel contain JSP source?
(package private)  boolean isTask()
          does this Panel contain task source?
(package private)  void jbInit()
           
 void matchBraces(KeyEvent e)
           
(package private)  void open(SourceTree sourceTree)
           
(package private)  void paste()
          paste text from clipboard
(package private)  void redo()
          if possible redo the last thing undone?
private  void refresh()
          some basic initialization/re-initialization
(package private)  void resetCursor()
          reset the editor's cursor to its default.
(package private)  void resetUndo()
          reset the undo manager.
(package private)  boolean save()
           
(package private)  boolean save(SourceTree sourceTree)
           
(package private)  void selectAll()
          set selection to entire document
(package private)  void setEditorCursor(Cursor c)
          set the cursor this editor should display
(package private)  void setHasChanged(boolean newChanged)
          update the state of the internal document
(package private)  void setIOManager(IOManager manager)
           
(package private)  void setSource(String text)
          fill this text editor with some arbitrary text
(package private)  void setSourceTree(SourceTree tree)
           
(package private)  void SourceTextArea_caretUpdate(CaretEvent e)
          caret update handler...
(package private)  void SourceTextArea_keyPressed(KeyEvent e)
          key pressed in text component
(package private)  void SourceTextArea_mouseClicked(MouseEvent e)
          mouse clicked in the text area event handler...
(package private)  void undo()
          if possible undo the last thing done.
private  void updateLineColumn()
          update the line and column info in the status bar
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, 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, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, 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, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, 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, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

borderLayout1

BorderLayout borderLayout1

EditorTabbedPane

JTabbedPane EditorTabbedPane

myTagInsightListener

TagInsightKeyListener myTagInsightListener

undoM

UndoManager undoM

EditorPopupMenu

JPopupMenu EditorPopupMenu

EditMenuItem

JMenuItem EditMenuItem

SourcePanel

JPanel SourcePanel

borderLayout4

BorderLayout borderLayout4

SourceTextArea

JTextComponent SourceTextArea

SourceScrollPane

JScrollPane SourceScrollPane

VDBList

JList VDBList

DesignSplitPane

JSplitPane DesignSplitPane

DesignTree

PageTree DesignTree

DesignPanel

JPanel DesignPanel

borderLayout2

BorderLayout borderLayout2

TreeScrollPane

JScrollPane TreeScrollPane

VDBScrollPane

JScrollPane VDBScrollPane

FileNameLabel

JLabel FileNameLabel

StatusPanel

JPanel StatusPanel

borderLayout3

BorderLayout borderLayout3

LineColumnLabel

JLabel LineColumnLabel

myMainPanel

private MainPanel myMainPanel

myContainer

private EditorContainer myContainer

changed

private boolean changed

executorPanel

private TaskExecutionPanel executorPanel

task

private boolean task

currentTagWizard

private TagWizard currentTagWizard

currentTag

private Tag currentTag

ioManager

private IOManager ioManager

sourceTree

private SourceTree sourceTree

caretTimer

Timer caretTimer

EDIT_LOCK

Object EDIT_LOCK

editSelectionStart

private int editSelectionStart

editSelectionLength

private int editSelectionLength

ambiguousTag

private boolean ambiguousTag
Constructor Detail

EditorPanel

public EditorPanel()
no arg construct kept for JBuilder designer should never be used otherwise...


EditorPanel

public EditorPanel(EditorContainer ec,
                   MainPanel mp,
                   boolean t)
Method Detail

jbInit

void jbInit()
      throws Exception
Throws:
Exception

insert

private void insert(int offset,
                    String string)

isTask

boolean isTask()
does this Panel contain task source?


isJSP

boolean isJSP()
does this Panel contain JSP source?


hasChanged

boolean hasChanged()
has the internal document changed?


setHasChanged

void setHasChanged(boolean newChanged)
update the state of the internal document

Parameters:
newChanged - - new value for changed

setEditorCursor

void setEditorCursor(Cursor c)
set the cursor this editor should display

Parameters:
c - - the cursor to use

getParentDropable

private Dropable getParentDropable()
get a Dropable item from the parent object

Returns:
Dropable item or null

resetCursor

void resetCursor()
reset the editor's cursor to its default.


cut

void cut()
cut selection to clipboard


copy

void copy()
copy selection to clipboard


paste

void paste()
paste text from clipboard


selectAll

void selectAll()
set selection to entire document


goTo

void goTo()
preset goto dialog


getSource

public String getSource()
Returns:
the source being edited

getTextComponent

public JTextComponent getTextComponent()
Returns:
the JTextComponent in use

checkTaglib

private void checkTaglib(JSPTag jt)
single out taglib JSP tags to set up associations...


checkTaglibs

void checkTaglibs()
package so code insight can access... parse the page looking for JSP tags so we can associate uris with namespaces


refresh

private void refresh()
some basic initialization/re-initialization


setSource

void setSource(String text)
fill this text editor with some arbitrary text

Parameters:
text - - the new text...

getIndent

private String getIndent(int from)
return the indent of the line containing a specific caret position

Parameters:
from - - the caret position of the line we want the indent for
Returns:
the indent..

updateLineColumn

private void updateLineColumn()
update the line and column info in the status bar


goToLine

void goToLine(int lineNo)
move the cursor to a specific line number

Parameters:
lineNo - - the line number to move the cursor to.

resetUndo

void resetUndo()
reset the undo manager.


canUndo

boolean canUndo()
is there anything that can be undone?


undo

void undo()
if possible undo the last thing done.


canRedo

boolean canRedo()
is there anything that can be redone?


redo

void redo()
if possible redo the last thing undone?


SourceTextArea_caretUpdate

void SourceTextArea_caretUpdate(CaretEvent e)
caret update handler...


caretInTag

private void caretInTag()

SourceTextArea_mouseClicked

void SourceTextArea_mouseClicked(MouseEvent e)
mouse clicked in the text area event handler...


EditMenuItem_actionPerformed

void EditMenuItem_actionPerformed(ActionEvent e)
user selected the "Edit" item from the popup menu


editableText

private boolean editableText(String text)

cursorInEditableTag

private boolean cursorInEditableTag()

edit

void edit()

DesignTree_mouseClicked

void DesignTree_mouseClicked(MouseEvent e)
mouse clicked in the design tree... KEEP?


SourceTextArea_keyPressed

void SourceTextArea_keyPressed(KeyEvent e)
key pressed in text component


checkDrop

private void checkDrop()

EditorTabbedPane_stateChanged

void EditorTabbedPane_stateChanged(ChangeEvent e)
tabbed pane event handler (switch from design to source mode) KEEP?


getIOManager

IOManager getIOManager()

setIOManager

void setIOManager(IOManager manager)

getAbsoluteName

String getAbsoluteName()

getRelativeName

String getRelativeName()

setSourceTree

void setSourceTree(SourceTree tree)

open

void open(SourceTree sourceTree)

save

boolean save()

save

boolean save(SourceTree sourceTree)

matchBraces

public void matchBraces(KeyEvent e)