Package edu.cnu.mdi.view.demo.layout
Class DeviceItem
java.lang.Object
edu.cnu.mdi.item.AItem
edu.cnu.mdi.item.PointItem
edu.cnu.mdi.view.demo.layout.DeviceItem
- All Implemented Interfaces:
IFeedbackProvider,IDrawable,EventListener
-
Field Summary
FieldsFields inherited from class edu.cnu.mdi.item.AItem
_connectable, _deletable, _dirty, _displayName, _doubleClickable, _draggable, _enabled, _focus, _FOCUSFILL, _lastDrawnPolygon, _layer, _line, _locked, _modification, _path, _popupMenu, _resizable, _resizePolicy, _rightClickable, _rotatable, _selectable, _selected, _style, _styleEditable, _visible, rotateIcon, RPSIZE, RPSIZE2, SPSIZE, SPSIZE2 -
Constructor Summary
ConstructorsConstructorDescriptionDeviceItem(Layer layer, Point2D.Double location, EDeviceSymbol symbol) Create a device item with the given symbol and world location. -
Method Summary
Modifier and TypeMethodDescriptionstatic DeviceItemcreateDeviceItem(Layer layer, Point p, EDeviceSymbol symbol) Create a device item centered at given point in local container coordinatesvoiddrawItem(Graphics2D g2, IContainer container) Custom drawer for the item.voidgetFeedbackStrings(IContainer container, Point pp, Point2D.Double wp, List<String> feedbackStrings) Add any appropriate feedback.Methods inherited from class edu.cnu.mdi.item.PointItem
getAlignmentH, getAlignmentV, getBounds, getWorldBounds, modify, setAlignmentH, setAlignmentV, setFocus, shouldDraw, startModification, translateWorldMethods inherited from class edu.cnu.mdi.item.AItem
acceptModification, applyGeometryProperties, applyProperties, applyStyleProperties, contains, createPopupMenu, doubleClicked, draw, drawSelections, enclosed, equals, focusFill, geometryChanged, getAzimuth, getContainer, getDisplayName, getFocus, getFocusPoint, getItemModification, getLastDrawnPolygon, getLayer, getLine, getPath, getPopupMenu, getResizePolicy, getRotatePoint, getSelectionPoints, getStyle, getStyleSafe, getView, hashCode, inASelectRect, inRotatePoint, inSelectPoint, isConnectable, isDeletable, isDirty, isDoubleClickable, isDraggable, isEnabled, isLocked, isResizable, isRightClickable, isRotatable, isSelectable, isSelected, isStyleEditable, isTrackable, isVisible, modificationRejected, prepareForPopup, prepareForRemoval, setAzimuth, setConnectable, setDeletable, setDirty, setDisplayName, setDoubleClickable, setDraggable, setEnabled, setFillFocus, setLocked, setModification, setResizable, setResizePolicy, setRightClickable, setRotatable, setSelectable, setSelected, setStyle, setStyleEditable, setVisible, stopModification, translateLocal, updateFocus
-
Field Details
-
DEVICESIZE
public static final int DEVICESIZE- See Also:
-
-
Constructor Details
-
DeviceItem
Create a device item with the given symbol and world location.- Parameters:
layer- the z layer to add the device tolocation- the world location for the devicesymbol- the device symbol to use
-
-
Method Details
-
drawItem
Description copied from class:PointItemCustom drawer for the item. -
createDeviceItem
Create a device item centered at given point in local container coordinates- Parameters:
layer- the z layer to add the device top- the point in local screen coordinatessymbol- the device symbol to use- Returns:
- the created device item
-
getFeedbackStrings
public void getFeedbackStrings(IContainer container, Point pp, Point2D.Double wp, List<String> feedbackStrings) Add any appropriate feedback.- Specified by:
getFeedbackStringsin interfaceIFeedbackProvider- Overrides:
getFeedbackStringsin classAItem- Parameters:
container- the Base container.pp- the mouse location.wp- the corresponding world point.feedbackStrings- the List of feedback strings to add to.
-