diva.canvas.tutorial
Class LabelTutorial

java.lang.Object
  extended by diva.canvas.tutorial.LabelTutorial

public class LabelTutorial
extends java.lang.Object

This tutorial illustrates how to use LabelFigure and related classes.

Version:
$Id: LabelTutorial.java 38798 2005-07-08 20:00:01Z cxh $
Author:
John Reekie

Field Summary
private  JCanvas canvas
           
(package private)  BasicController controller
           
(package private)  Interactor defaultInteractor
           
private  GraphicsPane graphicsPane
           
 
Constructor Summary
LabelTutorial()
          Create a JCanvas and put it into a window
 
Method Summary
 void createLabeledWrappers()
          Create a couple of figures with labels attached to them.
 void createLabels()
          Create a collection of labels.
static void main(java.lang.String[] argv)
          Main function
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

canvas

private JCanvas canvas

graphicsPane

private GraphicsPane graphicsPane

controller

BasicController controller

defaultInteractor

Interactor defaultInteractor
Constructor Detail

LabelTutorial

public LabelTutorial()
Create a JCanvas and put it into a window

Method Detail

createLabels

public void createLabels()
Create a collection of labels. One label is created with each possible anchor point. Note that the labels appear to be in the wrong locations: but they are the anchor of the label itself, not the displayed square, so they are correct.


createLabeledWrappers

public void createLabeledWrappers()
Create a couple of figures with labels attached to them. This simple illustrates the fact that labels can be easily attached to any arbitrary figure.


main

public static void main(java.lang.String[] argv)
Main function