Class PencilControl

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class PencilControl extends JDialog
A Dialog to control PencilScenes for a PencilDrawer.
Author:
Douglas Brown
See Also:
  • Field Details

    • frame

      protected TFrame frame
    • panelID

      protected Integer panelID
  • Constructor Details

    • PencilControl

      protected PencilControl(PencilDrawer pencilDrawer)
      Constructs a PencilControl for a specified PencilDrawer.
      Parameters:
      pencilDrawer - the PencilDrawer
  • Method Details

    • setFontLevel

      protected void setFontLevel(int level)
      Sets the font level
      Parameters:
      level - the font level
    • postDrawingEdit

      protected void postDrawingEdit(PencilDrawing drawing, PencilScene scene)
      Posts a drawing edit for a specified scene.
      Parameters:
      drawing - the drawing
      scene - the scene
    • postCaptionEdit

      protected void postCaptionEdit(PencilScene scene, String oldText, String newText)
      Posts a caption edit for a specified scene.
      Parameters:
      scene - the scene
      oldText - the previous caption text
      newText - the new caption text
    • postDeletionEdit

      protected void postDeletionEdit(PencilScene scene)
      Posts a deletion edit for a specified scene.
      Parameters:
      scene - the scene
    • postClearEdit

      protected void postClearEdit(ArrayList<PencilScene> scenes)
      Posts a clear edit.
      Parameters:
      scenes - the cleared scenes
    • refreshStyleButtons

      protected void refreshStyleButtons()
      Refreshes the GUI.
    • refreshGUI

      protected void refreshGUI()
      Refreshes the GUI.
    • repaintCanvas

      protected void repaintCanvas()
      Repaints the canvas.
    • setVisible

      public void setVisible(boolean vis)
      Overrides:
      setVisible in class Dialog
    • getSelectedScene

      protected PencilScene getSelectedScene()
      Gets the selected scene. May return null.
      Returns:
      the selected scene
    • setSelectedScene

      protected void setSelectedScene(PencilScene scene)
      Sets the selected scene.
      Parameters:
      scene - the scene to select. May be null.
    • dispose

      public void dispose()
      Overrides:
      dispose in class Window