public interface PlanView extends TransferableView, ExportableView
Modifier and Type | Interface and Description |
---|---|
static class |
PlanView.CursorType
The cursor types available in plan view.
|
TransferableView.DataType, TransferableView.TransferObserver
ExportableView.FormatType
View.PointerType
Modifier and Type | Method and Description |
---|---|
boolean |
canImportDraggedItems(java.util.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[] |
getPieceOfFurnitureSizeInPlan(HomePieceOfFurniture piece)
Returns the size of the given piece of furniture in the horizontal plan.
|
float |
getPixelLength()
Returns the length in centimeters of a pixel with the current scale.
|
float |
getPrintPreferredScale(float preferredWidth,
float preferredHeight)
Returns the preferred scale to ensure it can be fully printed on the given print zone.
|
float |
getScale()
Returns the scale used to display the plan.
|
float[][] |
getTextBounds(java.lang.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.
|
boolean |
isFurnitureSizeInPlanSupported()
Returns
true if the view is able to compute the size of horizontally rotated furniture. |
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(java.lang.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(java.util.List<DimensionLine> dimensionLines)
Sets the given dimension lines to be drawn as feedback.
|
void |
setDraggedItemsFeedback(java.util.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,
java.lang.Object[] toolTipPropertyValues,
float x,
float y)
Sets properties edited in tool tip.
|
void |
setToolTipEditedPropertyValue(PlanController.EditableProperty toolTipEditedProperty,
java.lang.Object toolTipPropertyValue)
Sets the value of a property edited in tool tip.
|
void |
setToolTipFeedback(java.lang.String toolTipFeedback,
float x,
float y)
Sets tool tip text displayed as feedback.
|
createTransferData
exportData, isFormatTypeSupported
void setRectangleFeedback(float x0, float y0, float x1, float y1)
void makeSelectionVisible()
void makePointVisible(float x, float y)
x
, y
) is visible,
moving scroll bars if needed.float getScale()
void setScale(float scale)
float getPrintPreferredScale(float preferredWidth, float preferredHeight)
preferredWidth
- width of the zone in cmpreferredHeight
- height of the zone in cmvoid moveView(float dx, float dy)
float convertXPixelToModel(int x)
x
converted in model coordinates space.float convertYPixelToModel(int y)
y
converted in model coordinates space.int convertXModelToScreen(float x)
x
converted in screen coordinates space.int convertYModelToScreen(float y)
y
converted in screen coordinates space.float getPixelLength()
float[][] getTextBounds(java.lang.String text, TextStyle style, float x, float y, float angle)
text
displayed at
the point (x
,y
).void setCursor(PlanView.CursorType cursorType)
void setToolTipFeedback(java.lang.String toolTipFeedback, float x, float y)
toolTipFeedback
- the text displayed in the tool tip
or null
to make tool tip disappear.void setToolTipEditedProperties(PlanController.EditableProperty[] toolTipEditedProperties, java.lang.Object[] toolTipPropertyValues, float x, float y)
void setToolTipEditedPropertyValue(PlanController.EditableProperty toolTipEditedProperty, java.lang.Object toolTipPropertyValue)
void deleteToolTipFeedback()
void setResizeIndicatorVisible(boolean resizeIndicatorVisible)
void setAlignmentFeedback(java.lang.Class<? extends Selectable> alignedObjectClass, Selectable alignedObject, float x, float y, boolean showPoint)
void setAngleFeedback(float xCenter, float yCenter, float x1, float y1, float x2, float y2)
void setDraggedItemsFeedback(java.util.List<Selectable> draggedItems)
void setDimensionLinesFeedback(java.util.List<DimensionLine> dimensionLines)
void deleteFeedback()
View getHorizontalRuler()
View getVerticalRuler()
boolean canImportDraggedItems(java.util.List<Selectable> items, int x, int y)
true
if this plan accepts to import dragged items at the given coordinates.float[] getPieceOfFurnitureSizeInPlan(HomePieceOfFurniture piece)
boolean isFurnitureSizeInPlanSupported()
true
if the view is able to compute the size of horizontally rotated furniture.
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License