Documentation of 'org.jhotdraw.samples.svg.gui.DrawingComponent' Java class
DrawingComponent
org.jhotdraw.samples.svg.gui

Interface DrawingComponent



  • public interface DrawingComponent
    The DrawingComponent holds the drawing editor used by the DrawingApplet.

    The DrawingComponent covers the whole content pane of the DrawingApplet. It thus has to provide the user interface elements for saving the drawing and canceling the applet on its own. The DrawingApplet registers with the DrawingComponent as an ActionListener to receive "save" and "cancel" action commands.

    • Method Detail

      • getComponent

        javax.swing.JComponent getComponent()
        Returns the component of the DrawingComponent.
      • getDrawing

        Drawing getDrawing()
        Returns the drawing of the DrawingComponent.
      • setDrawing

        void setDrawing(Drawing newValue)
        Sets the drawing of the DrawingComponent.
      • addActionListener

        void addActionListener(java.awt.event.ActionListener listener)
        Adds an ActionListener.

        The ActionListener receives an ActionEvent with action command "save" when the user clicks at the save button on the drawing component.

        The ActionListener receives an ActionEvent with action command "cancel" when the user clicks at the cancel button on the drawing component.

      • removeActionListener

        void removeActionListener(java.awt.event.ActionListener listener)
        Removes an ActionListener.
      • getSummary

        java.lang.String getSummary()
        Returns a summary about the changes made on the drawing.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.