HEADER

ru.biosoft.graphics.editor
Interface ViewEditorHelper

All Known Implementing Classes:
DiagramEditorHelper, DefaultViewEditorHelper

public interface ViewEditorHelper

This class is used to provide all neccessary changes and validations in model. Generally two strategies for ViewEditorHelper 1) really update the view and model 2) update the model and recreate the view according to model


Method Summary
 Viewadd(Object obj, Point location)
          Should provides necessary changes in view and model if the view can be resized.
 booleancanAccept(CompositeView composite, View view)
           
 ObjectcreateObject(Class clazz, Point pt)
           
 Action[]getActions()
          we can use different selections for different viewes
 booleanisResizable(View view)
           
 DimensionmoveView(View view, Dimension offset)
          Should provides necessary changes in view and model if the view can be moved on the specified offset.
 voidregister(ViewEditorPane viewEditor)
          register this ViewEditorHelper for the specified ViewEditorPane.
 booleanremoveView(View view)
          Should provides necessary changes in view and model if the view can removed.
 DimensionresizeView(View view, Dimension size)
          Should provides necessary changes in view and model if the view can be resized.

Method Detail

add

public View add(Object obj, Point location)
Should provides necessary changes in view and model if the view can be resized.
returns view for the specified object.

canAccept

public boolean canAccept(CompositeView composite, View view)
returns whether a specified view can be inserted to other view.

createObject

public Object createObject(Class clazz, Point pt)
todo comment

getActions

public Action[] getActions()
we can use different selections for different viewes

isResizable

public boolean isResizable(View view)
returns whether a specified view can be resized.

moveView

public Dimension moveView(View view, Dimension offset)
Should provides necessary changes in view and model if the view can be moved on the specified offset.
returns shift on which the view was moved.

register

public void register(ViewEditorPane viewEditor)
register this ViewEditorHelper for the specified ViewEditorPane.

removeView

public boolean removeView(View view)
Should provides necessary changes in view and model if the view can removed.
returns whether the view was removed.

resizeView

public Dimension resizeView(View view, Dimension size)
Should provides necessary changes in view and model if the view can be resized.
returns new view size.

FOOTER

BOTTOM