JHotDraw 7.4.1

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.

Version:
$Id: DrawingComponent.java 527 2009-06-07 14:28:19Z rawcoder $
Author:
Werner Randelshofer

Method Summary
 void addActionListener(java.awt.event.ActionListener listener)
          Adds an ActionListener.
 javax.swing.JComponent getComponent()
          Returns the component of the DrawingComponent.
 Drawing getDrawing()
          Returns the drawing of the DrawingComponent.
 java.lang.String getSummary()
          Returns a summary about the changes made on the drawing.
 void removeActionListener(java.awt.event.ActionListener listener)
          Removes an ActionListener.
 void setDrawing(Drawing newValue)
          Sets the drawing of the DrawingComponent.
 

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.


Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.