|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ViewComponent
A ViewComponent
represents the actual visualization
component of a View
. A View
typically contains menu components and a single
ViewComponent
.
Field Summary | |
---|---|
static int |
ALL
Bit mask combining SCENE , SELECTION , and
TOOLS . |
static int |
CHANGED
Bit mask for repaint(int) indicating that a repaint
is requested due to a change of scene or display size. |
static int |
MIN_USER_FLAG
Smallest bit mask for repaint(int) that can be used
freely by implementations of ViewComponent . |
static int |
SCENE
Bit mask for repaint(int) indicating that the whole
scene has to be repainted. |
static int |
SELECTION
Bit mask for repaint(int) indicating that the
selection state of objects has to be repainted. |
static int |
TOOLS
Bit mask for repaint(int) indicating that the
tools () have to be repainted. |
Method Summary | |
---|---|
void |
disposeRenderer(Renderer r)
|
Item |
getFactory()
Returns the factory item which has been set by initFactory(Item) , i.e., the item which
created this component. |
int |
getGlobalLOD()
Determines the global level-of-detail which should currently be used in this view component. |
void |
initFactory(Item factory)
Sets the factory item which created this view component. |
void |
initView(View view,
EventListener listener)
Initializes this component. |
void |
makeSnapshot(ObjectConsumer<? super java.awt.image.RenderedImage> callback)
Instructs the view component to create a snapshot. |
void |
render(Renderer r)
Initiates a rendering of the graph using the specified renderer. |
void |
render(Renderer r,
int widht,
int height)
|
void |
repaint(int flags)
Initiates a repaint of those parts of the view which are indicated by the flags , interpreted as a
combination of bit masks. |
Methods inherited from interface de.grogra.pf.ui.ComponentWrapper |
---|
getComponent |
Methods inherited from interface de.grogra.util.Disposable |
---|
dispose |
Field Detail |
---|
static final int ALL
SCENE
, SELECTION
, and
TOOLS
.
static final int CHANGED
repaint(int)
indicating that a repaint
is requested due to a change of scene or display size.
static final int MIN_USER_FLAG
repaint(int)
that can be used
freely by implementations of ViewComponent
. It is
guaranteed that there is no conflict with the other bit masks.
static final int SCENE
repaint(int)
indicating that the whole
scene has to be repainted.
static final int SELECTION
repaint(int)
indicating that the
selection state of objects has to be repainted.
static final int TOOLS
repaint(int)
indicating that the
tools ()
have to be repainted.
Method Detail |
---|
void disposeRenderer(Renderer r)
Item getFactory()
initFactory(Item)
, i.e., the item which
created this component.
int getGlobalLOD()
View.LOD_MIN
and View.LOD_MAX
inclusively.
void initFactory(Item factory)
factory
- factory itemvoid initView(View view, EventListener listener)
view
within which this view component is used to display the graph.
It also sets an event listener. this has to be informed of
mouse and keys events within the view component by implementations
of this method.
view
- the containing viewlistener
- mouse and key events will be reported to this listenervoid makeSnapshot(ObjectConsumer<? super java.awt.image.RenderedImage> callback)
callback
as an
instance of RenderedImage
. This may happen asynchronously,
i.e., in an arbitrary thread.
callback
- callback which asynchronously receives the snapshotvoid render(Renderer r)
r
- void render(Renderer r, int widht, int height)
void repaint(int flags)
flags
, interpreted as a
combination of bit masks. This method may be invoked from
arbitrary threads.
flags
- the parts to be repainted
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |