Class ScreenEditor

All Implemented Interfaces:
IActivationListener, IDraggingFix, IWorkbenchPartIZ, IPropertyEditorController, IPropUndoContext, ITermEditor, ITerminalStateListener, IDisposedPart, IPropUndoRedo, IAdaptable, IExecutableExtension, ISelectionChangedListener, ISelectionProvider, IGotoMarker, IEditorPart, INavigationLocationProvider, IPersistable, IPersistableEditor, ISaveablePart, ISaveablesSource, IWorkbenchPart, IWorkbenchPart2, IWorkbenchPart3, IWorkbenchPartOrientation

public class ScreenEditor extends PropEditorPart implements ITerminalStateListener, ITermEditor
The Terminal Screen Editor part.
Author:
Christopher Mindus
  • Field Details Link icon

    • ID Link icon

      public static final String ID
      The Part ID.
    • sessionNameQualifier Link icon

      public static final QualifiedName sessionNameQualifier
      The Session Name Qualifier for files.
    • hostSession Link icon

      public HostSession hostSession
      The host session.
    • xPopupOffset Link icon

      public int xPopupOffset
      The popup offset in X.
    • yPopupOffset Link icon

      public int yPopupOffset
      The popup offset in Y.
  • Constructor Details Link icon

    • ScreenEditor Link icon

      public ScreenEditor()
      Eclipse constructor.
  • Method Details Link icon

    • initEditor Link icon

      protected void initEditor(PropCnr cnr) throws PartInitException
      The initialize editor method.

      Subclasses may override this method.

      Overrides:
      initEditor in class PropEditorPart
      Parameters:
      cnr - The property container being edited. Note: the real name of the property is in the parent FilePropCnr Atom.
      Throws:
      PartInitException - For initialization failures.
    • onEditorActivated Link icon

      protected void onEditorActivated(boolean on)
      Called when editor is activated. The time is stored so that focus events can check if they should be processed or not (marking in Terminal).
      Overrides:
      onEditorActivated in class PropEditorPart
    • usePasteBeforeAfter Link icon

      protected boolean usePasteBeforeAfter()
      Override to return how paste before/after are processed.
      Overrides:
      usePasteBeforeAfter in class PropEditorPart
      Returns:
      true to handle before/after.
    • isTooltipTextShown Link icon

      public boolean isTooltipTextShown()
      If tool tips are shown.
      Specified by:
      isTooltipTextShown in interface ITermEditor
    • isHotSpotEnabled Link icon

      public boolean isHotSpotEnabled()
      Check for hotspot enabled.
      Specified by:
      isHotSpotEnabled in interface ITermEditor
    • isCursorPresent Link icon

      public boolean isCursorPresent()
      Cursor present (and blinking)?
      Specified by:
      isCursorPresent in interface ITermEditor
    • getViewer Link icon

      public TreeViewer getViewer()
      Gets the viewer.
      Specified by:
      getViewer in interface ITermEditor
    • getHostSession Link icon

      public HostSession getHostSession()
      Gets the HostSession.
      Specified by:
      getHostSession in interface ITermEditor
    • onClose Link icon

      public void onClose()
      Called when the part is being closed but is not yet disposed but hidden.
      Specified by:
      onClose in interface IActivationListener
      Overrides:
      onClose in class PropEditorPart
    • dispose Link icon

      public void dispose()
      Dispose of the editor.
      Specified by:
      dispose in interface IWorkbenchPart
      Overrides:
      dispose in class PropEditorPart
    • createEditorComposite Link icon

      protected void createEditorComposite(Composite parent)
      Creates the Editor Main Composite.
      Specified by:
      createEditorComposite in class PropEditorPart
      Parameters:
      parent - The empty parent composite without initialized layout, with the widget background color.
    • getMarkingConstraints Link icon

      public Rectangle getMarkingConstraints()
      Gets the rectangle marking constraints. This is used for pop-up windows.
      Specified by:
      getMarkingConstraints in interface ITermEditor
      Returns:
      null If no constrains are present.
    • performPrint Link icon

      protected void performPrint()
      Performs Print.
      Specified by:
      performPrint in class PropEditorPart
    • onTerminalStateUpdate Link icon

      public void onTerminalStateUpdate(HostSession hostSession, TerminalWindow tw)
      Called when state probably needs update or check.
      Specified by:
      onTerminalStateUpdate in interface ITerminalStateListener
      Parameters:
      hostSession - The host session, may be null.
      tw - The TerminalWindow, may be null when hostSession is null, not otherwise.
    • onTerminalFieldChanged Link icon

      public void onTerminalFieldChanged(HostSession hostSession, TerminalWindow tw)
      Called when the screen needs updates due to field change.
      Specified by:
      onTerminalFieldChanged in interface ITerminalStateListener
      Parameters:
      hostSession - The host session, may be null.
      tw - The TerminalWindow, may be null when hostSession is null, not otherwise.
    • updateToolStates Link icon

      public void updateToolStates()
      Updates tool states.
      Specified by:
      updateToolStates in interface ITermEditor
    • saveStateImpl Link icon

      protected void saveStateImpl(IMemento memento)
      Saves the state.
      Overrides:
      saveStateImpl in class PropEditorPart
      Parameters:
      memento - The storage area for object's state.
    • getTerminalComposite Link icon

      public TerminalComposite getTerminalComposite()
      Gets the terminal composite.
      Specified by:
      getTerminalComposite in interface ITermEditor
    • selectionChangedEx Link icon

      protected void selectionChangedEx(SelectionChangedEvent event)
      Selection changes in the tree.
      Overrides:
      selectionChangedEx in class PropEditorPart
    • updateStatesEx Link icon

      protected void updateStatesEx()
      Called to update the states.
      Overrides:
      updateStatesEx in class PropEditorPart
    • doOpen Link icon

      public boolean doOpen(GProp<?>[] props)
      Opens the property by selecting it in focus.
      Overrides:
      doOpen in class PropEditorPart
    • doOpen Link icon

      public boolean doOpen(GProp<?> prop, int index, String childName)
      Opens the property by selecting it in focus. This method must be overridden.
      Overrides:
      doOpen in class PropEditorPart
      Parameters:
      prop - The property to focus.
      index - The index in a multi-property.
      childName - Name of child property or null.
      Returns:
      true for success, false for failure.
    • onDoubleClick Link icon

      public void onDoubleClick(int x, int y)
      Marks the host field.
      Specified by:
      onDoubleClick in interface ITermEditor
    • paint Link icon

      public void paint(Graphics2D g, int leftMargin, int topMargin, int cxFont, int cyFont, int cxFontReal, int cyFontReal, int cxScreen, int cyScreen, Rectangle clipRect)
      Paints the Graphics once the screen is drawn, before the cursor.
      Specified by:
      paint in interface ITermEditor