Search this API

y.view
Interface View

All Known Implementing Classes:
Graph2DView, Overview

public interface View

Interface for classes that implement a view for a Graph2D.

 

Method Summary
 java.awt.Component getComponent()
          Returns the AWT component on which the view acts.
 java.awt.Frame getFrame()
          Returns the frame in which the view is contained.
 Graph2D getGraph2D()
          Returns the Graph2D that this view displays.
 void updateView()
          Redraws the content of this view.
 void updateView(double x, double y, double w, double h)
          Redraws parts of the contents of this view.
 

Method Detail

getGraph2D

Graph2D getGraph2D()
Returns the Graph2D that this view displays.


updateView

void updateView()
Redraws the content of this view. Yes, this is an important method.


updateView

void updateView(double x,
                double y,
                double w,
                double h)
Redraws parts of the contents of this view. This method can be used for optimized repaints.

Parameters:
x - the upper left corner of the rectangular area to be updated in world coordinates
y - the upper left corner of the rectangular area to be updated in world coordinates
w - the width of the rectangular area to be updated in world coordinates
h - the height of the rectangular area to be updated in world coordinates
See Also:
updateView(), Component.repaint(int, int, int, int)

getFrame

java.awt.Frame getFrame()
Returns the frame in which the view is contained. If there is no such frame null is returned.


getComponent

java.awt.Component getComponent()
Returns the AWT component on which the view acts.


© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.