Sweet Home 3D 4.1

com.eteks.sweethome3d.viewcontroller
Interface PlanView

All Superinterfaces:
View
All Known Implementing Classes:
MultipleLevelsPlanPanel, PlanComponent

public interface PlanView
extends View

The view that displays the plan of a home.

Author:
Emmanuel Puybaret

Nested Class Summary
static class PlanView.CursorType
          The cursor types available in plan view.
 
Method Summary
 boolean canImportDraggedItems(List<Selectable> items, int x, int y)
          Returns true if this plan accepts to import dragged items at the given coordinates.
 int convertXModelToScreen(float x)
          Returns x converted in screen coordinates space.
 float convertXPixelToModel(int x)
          Returns x converted in model coordinates space.
 int convertYModelToScreen(float y)
          Returns y converted in screen coordinates space.
 float convertYPixelToModel(int y)
          Returns y converted in model coordinates space.
 void deleteFeedback()
          Deletes all elements shown as feedback.
 void deleteToolTipFeedback()
          Deletes tool tip text from screen.
 View getHorizontalRuler()
          Returns the component used as an horizontal ruler for this plan.
 float getPixelLength()
          Returns the length in centimeters of a pixel with the current scale.
 float getScale()
          Returns the scale used to display the plan.
 float[][] getTextBounds(String text, TextStyle style, float x, float y, float angle)
          Returns the coordinates of the bounding rectangle of the text displayed at the point (x,y).
 View getVerticalRuler()
          Returns the component used as a vertical ruler for this plan.
 void makePointVisible(float x, float y)
          Ensures the point at (x, y) is visible, moving scroll bars if needed.
 void makeSelectionVisible()
          Ensures selected items are visible at screen and moves scroll bars if needed.
 void moveView(float dx, float dy)
          Moves the view from (dx, dy) unit in the scrolling zone it belongs to.
 void setAlignmentFeedback(Class<? extends Selectable> alignedObjectClass, Selectable alignedObject, float x, float y, boolean showPoint)
          Sets the location point for alignment feedback.
 void setAngleFeedback(float xCenter, float yCenter, float x1, float y1, float x2, float y2)
          Sets the points used to draw an angle in plan view.
 void setCursor(PlanView.CursorType cursorType)
          Sets the cursor of this component as rotation cursor.
 void setDimensionLinesFeedback(List<DimensionLine> dimensionLines)
          Sets the given dimension lines to be drawn as feedback.
 void setDraggedItemsFeedback(List<Selectable> draggedItems)
          Sets the feedback of dragged items drawn during a drag and drop operation, initiated from outside of plan view.
 void setRectangleFeedback(float x0, float y0, float x1, float y1)
          Sets rectangle selection feedback coordinates.
 void setResizeIndicatorVisible(boolean resizeIndicatorVisible)
          Sets whether the resize indicator of selected wall or piece of furniture should be visible or not.
 void setScale(float scale)
          Sets the scale used to display the plan.
 void setToolTipEditedProperties(PlanController.EditableProperty[] toolTipEditedProperties, Object[] toolTipPropertyValues, float x, float y)
          Set properties edited in tool tip.
 void setToolTipFeedback(String toolTipFeedback, float x, float y)
          Sets tool tip text displayed as feedback.
 

Method Detail

setRectangleFeedback

void setRectangleFeedback(float x0,
                          float y0,
                          float x1,
                          float y1)
Sets rectangle selection feedback coordinates.


makeSelectionVisible

void makeSelectionVisible()
Ensures selected items are visible at screen and moves scroll bars if needed.


makePointVisible

void makePointVisible(float x,
                      float y)
Ensures the point at (x, y) is visible, moving scroll bars if needed.


getScale

float getScale()
Returns the scale used to display the plan.


setScale

void setScale(float scale)
Sets the scale used to display the plan.


moveView

void moveView(float dx,
              float dy)
Moves the view from (dx, dy) unit in the scrolling zone it belongs to.


convertXPixelToModel

float convertXPixelToModel(int x)
Returns x converted in model coordinates space.


convertYPixelToModel

float convertYPixelToModel(int y)
Returns y converted in model coordinates space.


convertXModelToScreen

int convertXModelToScreen(float x)
Returns x converted in screen coordinates space.


convertYModelToScreen

int convertYModelToScreen(float y)
Returns y converted in screen coordinates space.


getPixelLength

float getPixelLength()
Returns the length in centimeters of a pixel with the current scale.


getTextBounds

float[][] getTextBounds(String text,
                        TextStyle style,
                        float x,
                        float y,
                        float angle)
Returns the coordinates of the bounding rectangle of the text displayed at the point (x,y).


setCursor

void setCursor(PlanView.CursorType cursorType)
Sets the cursor of this component as rotation cursor.


setToolTipFeedback

void setToolTipFeedback(String toolTipFeedback,
                        float x,
                        float y)
Sets tool tip text displayed as feedback.

Parameters:
toolTipFeedback - the text displayed in the tool tip or null to make tool tip disappear.

setToolTipEditedProperties

void setToolTipEditedProperties(PlanController.EditableProperty[] toolTipEditedProperties,
                                Object[] toolTipPropertyValues,
                                float x,
                                float y)
Set properties edited in tool tip.


deleteToolTipFeedback

void deleteToolTipFeedback()
Deletes tool tip text from screen.


setResizeIndicatorVisible

void setResizeIndicatorVisible(boolean resizeIndicatorVisible)
Sets whether the resize indicator of selected wall or piece of furniture should be visible or not.


setAlignmentFeedback

void setAlignmentFeedback(Class<? extends Selectable> alignedObjectClass,
                          Selectable alignedObject,
                          float x,
                          float y,
                          boolean showPoint)
Sets the location point for alignment feedback.


setAngleFeedback

void setAngleFeedback(float xCenter,
                      float yCenter,
                      float x1,
                      float y1,
                      float x2,
                      float y2)
Sets the points used to draw an angle in plan view.


setDraggedItemsFeedback

void setDraggedItemsFeedback(List<Selectable> draggedItems)
Sets the feedback of dragged items drawn during a drag and drop operation, initiated from outside of plan view.


setDimensionLinesFeedback

void setDimensionLinesFeedback(List<DimensionLine> dimensionLines)
Sets the given dimension lines to be drawn as feedback.


deleteFeedback

void deleteFeedback()
Deletes all elements shown as feedback.


getHorizontalRuler

View getHorizontalRuler()
Returns the component used as an horizontal ruler for this plan.


getVerticalRuler

View getVerticalRuler()
Returns the component used as a vertical ruler for this plan.


canImportDraggedItems

boolean canImportDraggedItems(List<Selectable> items,
                              int x,
                              int y)
Returns true if this plan accepts to import dragged items at the given coordinates.


Sweet Home 3D 4.1

© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License