com.infoengine.modeler.UI
Class EditorContainer

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.EditorContainer
All Implemented Interfaces:
Accessible, ContainsDropable, ImageObserver, MenuContainer, Serializable

public class EditorContainer
extends ModelerPanel
implements ContainsDropable

See Also:
Serialized Form

Nested Class Summary
(package private)  class EditorContainer.DnDTabbedPane
           
 
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
(package private)  BorderLayout borderLayout1
           
(package private)  JToolBar CoreToolBar
           
(package private)  JButton DeclarationButton
           
(package private)  EditorContainer.DnDTabbedPane EditorTabbedPane
           
(package private)  JButton EditTagButton
           
(package private)  JToolBar EditToolBar
           
(package private)  JButton ExpressionButton
           
(package private)  FindDialog find
           
(package private)  JButton ForEachButton
           
(package private)  GoToLineDialog goTo
           
(package private)  JToolBar IconToolBar
           
(package private)  JToolBar JSPToolBar1
           
(package private)  JToolBar JSPToolBar2
           
(package private)  JButton PageButton
           
(package private)  JButton ParallelButton
           
(package private)  MainPanel parent
           
(package private)  JButton ScriptletButton
           
(package private)  JButton TaglibButton
           
(package private)  JButton TaskButton
           
(package private)  TitledBorder titledBorder1
           
(package private)  Dropable toDrop
           
 
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
EditorContainer()
           
 
Method Summary
private  void addEditor(EditorPanel ep)
          add an EditorPanel tab
(package private)  boolean changedEditors()
           
(package private)  boolean closeAllEditors()
          close all open EditorPanels.
private  boolean closeEditor(EditorPanel ep)
          close a specific EditorPanel.
(package private)  boolean closeSelectedEditor()
          close the currently selected EditorPanel.
(package private)  void DeclarationButton_actionPerformed(ActionEvent e)
          DeclarationButton event handler
(package private)  void EditorTabbedPane_stateChanged(ChangeEvent e)
          the state of the EditorContainer changed, notify the main frame.
(package private)  void EditTagButton_actionPerformed(ActionEvent e)
          EditTagButton event handler
(package private)  void ExpressionButton_actionPerformed(ActionEvent e)
          ExpressionButton event handler
(package private)  void find()
          present the find dialog
(package private)  void findAgainDown()
          re-execute a previous find on the current EditorPanel (down)
(package private)  void findAgainUp()
          re-execute a previous find on the current EditorPanel (up)
(package private)  void ForEachButton_actionPerformed(ActionEvent e)
          ForEachButton event handler
(package private)  int getEditorCount()
           
(package private)  EditorPanel[] getEditors()
          retrieve an array of the open EditorPanels
 Dropable getSelectedDropable()
          return the item to be dropped
(package private)  EditorPanel getSelectedEditor()
          retrieve the currently selected EditorPanel
(package private)  int getSelectedIndex()
           
private  String getTabTitle(EditorPanel ep)
          get the title of a specific editor
(package private)  void goTo()
          present the goto dialog
private  void initFind()
          curious but if FindDialog is created at EditorContainer creation time it damages the dialog so that checkboxes and radiobuttons do not display properly and are unusable.
(package private)  boolean isEditButtonEnabled()
           
(package private)  void jbInit()
           
private  String makeUpName(EditorPanel ep)
           
private  void newEditor(String source, boolean task)
          open a new EditorPanel containing some text
(package private)  void newJSP(String source)
          open a new EditorPanel containing a JSP
(package private)  void newTask(String source)
          open a new EditorPanel containing a task
(package private)  void open(File f)
           
(package private)  void open(IOManager manager, SourceTree tree)
           
(package private)  boolean openEditors()
          are there open EditorPanels?
(package private)  void PageButton_actionPerformed(ActionEvent e)
          PageButton event handler
(package private)  void ParallelButton_actionPerformed(ActionEvent e)
          ParallelButton event handler
(package private)  void refreshEditor(EditorPanel ep)
           
 void resetCursor()
          reset cursors to defaults if necessary
(package private)  boolean save()
          save the currently selected EditorPanel contents to its source
(package private)  boolean save(IOManager manager, SourceTree tree)
           
(package private)  void saveAllEditors()
          save all open changed EditorPanels.
private  boolean saveEditor(EditorPanel ep)
          perform a save operation on a specific editor.
(package private)  void ScriptletButton_actionPerformed(ActionEvent e)
          ScriptletButton event handler
(package private)  void setEditButtonEnabled(boolean b)
           
(package private)  void setEditorCursor(Cursor c)
          set the cursor in use by the currently selected EditorPanel
(package private)  void setMainPanel(MainPanel parent)
          stores the parent...
(package private)  void setSelectedIndex(int index)
           
private  void setToDrop(Dropable d)
          make this object act as the Droper of a Dropable item
(package private)  void TaglibButton_actionPerformed(ActionEvent e)
          TaglibButton event handler
(package private)  void TaskButton_actionPerformed(ActionEvent e)
          TaskButton event handler
private  void updateDnd()
           
 
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

IconToolBar

JToolBar IconToolBar

CoreToolBar

JToolBar CoreToolBar

JSPToolBar1

JToolBar JSPToolBar1

JSPToolBar2

JToolBar JSPToolBar2

EditToolBar

JToolBar EditToolBar

ForEachButton

JButton ForEachButton

ParallelButton

JButton ParallelButton

TaskButton

JButton TaskButton

ExpressionButton

JButton ExpressionButton

ScriptletButton

JButton ScriptletButton

DeclarationButton

JButton DeclarationButton

TaglibButton

JButton TaglibButton

PageButton

JButton PageButton

EditTagButton

JButton EditTagButton

titledBorder1

TitledBorder titledBorder1

EditorTabbedPane

EditorContainer.DnDTabbedPane EditorTabbedPane

find

FindDialog find

goTo

GoToLineDialog goTo

toDrop

Dropable toDrop

parent

MainPanel parent
Constructor Detail

EditorContainer

public EditorContainer()
Method Detail

jbInit

void jbInit()
      throws Exception
Throws:
Exception

setMainPanel

void setMainPanel(MainPanel parent)
stores the parent...


newJSP

void newJSP(String source)
open a new EditorPanel containing a JSP


newTask

void newTask(String source)
open a new EditorPanel containing a task


newEditor

private void newEditor(String source,
                       boolean task)
open a new EditorPanel containing some text

Parameters:
source - - the text to place in the new EditorPanel

open

void open(File f)

open

void open(IOManager manager,
          SourceTree tree)

addEditor

private void addEditor(EditorPanel ep)
add an EditorPanel tab

Parameters:
ep - - the EditorPanel to add

makeUpName

private String makeUpName(EditorPanel ep)

refreshEditor

void refreshEditor(EditorPanel ep)

getSelectedEditor

EditorPanel getSelectedEditor()
retrieve the currently selected EditorPanel

Returns:
currently selected EditorPanel or null

getEditorCount

int getEditorCount()
Returns:
number of open editors

getSelectedIndex

int getSelectedIndex()
Returns:
index of selected editor

setSelectedIndex

void setSelectedIndex(int index)
Parameters:
index - editor index to select

changedEditors

boolean changedEditors()

getTabTitle

private String getTabTitle(EditorPanel ep)
get the title of a specific editor

Parameters:
ep - the editor

saveEditor

private boolean saveEditor(EditorPanel ep)
perform a save operation on a specific editor. if the editor was opened from somewhere just save else prompt to have it saved to a local file.


saveAllEditors

void saveAllEditors()
save all open changed EditorPanels.


closeAllEditors

boolean closeAllEditors()
close all open EditorPanels. prompt when panel contains unsaved changes.


updateDnd

private void updateDnd()

closeEditor

private boolean closeEditor(EditorPanel ep)
close a specific EditorPanel. prompt when panel contains unsaved changes.


closeSelectedEditor

boolean closeSelectedEditor()
close the currently selected EditorPanel. prompt when panel contains unsaved changes.


save

boolean save()
save the currently selected EditorPanel contents to its source

Returns:
true on success, false otherwise

save

boolean save(IOManager manager,
             SourceTree tree)

setEditorCursor

void setEditorCursor(Cursor c)
set the cursor in use by the currently selected EditorPanel

Parameters:
c - - the cursor the EditorPanel should use

openEditors

boolean openEditors()
are there open EditorPanels?

Returns:
true if there are open EditorPanels, else false

isEditButtonEnabled

boolean isEditButtonEnabled()

setEditButtonEnabled

void setEditButtonEnabled(boolean b)

EditTagButton_actionPerformed

void EditTagButton_actionPerformed(ActionEvent e)
EditTagButton event handler


ForEachButton_actionPerformed

void ForEachButton_actionPerformed(ActionEvent e)
ForEachButton event handler


ParallelButton_actionPerformed

void ParallelButton_actionPerformed(ActionEvent e)
ParallelButton event handler


TaskButton_actionPerformed

void TaskButton_actionPerformed(ActionEvent e)
TaskButton event handler


goTo

void goTo()
present the goto dialog


find

void find()
present the find dialog


findAgainDown

void findAgainDown()
re-execute a previous find on the current EditorPanel (down)


findAgainUp

void findAgainUp()
re-execute a previous find on the current EditorPanel (up)


ScriptletButton_actionPerformed

void ScriptletButton_actionPerformed(ActionEvent e)
ScriptletButton event handler


ExpressionButton_actionPerformed

void ExpressionButton_actionPerformed(ActionEvent e)
ExpressionButton event handler


DeclarationButton_actionPerformed

void DeclarationButton_actionPerformed(ActionEvent e)
DeclarationButton event handler


TaglibButton_actionPerformed

void TaglibButton_actionPerformed(ActionEvent e)
TaglibButton event handler


PageButton_actionPerformed

void PageButton_actionPerformed(ActionEvent e)
PageButton event handler


getEditors

EditorPanel[] getEditors()
retrieve an array of the open EditorPanels

Returns:
EditoPanel[]

EditorTabbedPane_stateChanged

void EditorTabbedPane_stateChanged(ChangeEvent e)
the state of the EditorContainer changed, notify the main frame.


setToDrop

private void setToDrop(Dropable d)
make this object act as the Droper of a Dropable item

Parameters:
d - - the item to be dropped

initFind

private void initFind()
curious but if FindDialog is created at EditorContainer creation time it damages the dialog so that checkboxes and radiobuttons do not display properly and are unusable. deferring creation until first use seems so solve this problem.....


getSelectedDropable

public Dropable getSelectedDropable()
return the item to be dropped

Specified by:
getSelectedDropable in interface ContainsDropable
Returns:
Dropable object or null

resetCursor

public void resetCursor()
Description copied from interface: ContainsDropable
reset cursors to defaults if necessary

Specified by:
resetCursor in interface ContainsDropable