Package edu.cnu.mdi.item
Class ImageItem
java.lang.Object
edu.cnu.mdi.item.AItem
edu.cnu.mdi.item.PathBasedItem
edu.cnu.mdi.item.PolygonItem
edu.cnu.mdi.item.RectangleItem
edu.cnu.mdi.item.ImageItem
- All Implemented Interfaces:
IFeedbackProvider,IDrawable,EventListener
A
RectangleItem that displays a BufferedImage scaled to its
bounds, with no fill or outline drawn for the rectangle itself.
All standard interactions are enabled by default (draggable, selectable, resizable, rotatable, deletable, right-clickable, unlocked). If no explicit bounds are given, the item is sized and positioned to the image's natural dimensions, centered in the container.
-
Field Summary
Fields 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
ConstructorsConstructorDescriptionImageItem(Layer layer, Rectangle2D.Double wr, BufferedImage image) Create a world image object. -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawItem(Graphics2D g2, IContainer container) Custom drawer for the item.Methods inherited from class edu.cnu.mdi.item.RectangleItem
reshapeMethods inherited from class edu.cnu.mdi.item.PolygonItem
setPathMethods inherited from class edu.cnu.mdi.item.PathBasedItem
contains, getBounds, getRotatePoint, getWorldBounds, modify, rotate, scale, shouldDraw, singlePointBounds, threePointAngle, translateWorld, updateFocusMethods inherited from class edu.cnu.mdi.item.AItem
acceptModification, applyGeometryProperties, applyProperties, applyStyleProperties, createPopupMenu, doubleClicked, draw, drawSelections, enclosed, equals, focusFill, geometryChanged, getAzimuth, getContainer, getDisplayName, getFeedbackStrings, getFocus, getFocusPoint, getItemModification, getLastDrawnPolygon, getLayer, getLine, getPath, getPopupMenu, getResizePolicy, 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, setFocus, setLocked, setModification, setResizable, setResizePolicy, setRightClickable, setRotatable, setSelectable, setSelected, setStyle, setStyleEditable, setVisible, startModification, stopModification, translateLocal
-
Constructor Details
-
ImageItem
Create a world image object.- Parameters:
layer- the z layer this item is on.wr- the initial bounds of the item. If null, the image size is used.image- the image to display.
-
-
Method Details
-
drawItem
Custom drawer for the item.- Overrides:
drawItemin classPathBasedItem- Parameters:
g2- the graphics context.container- the graphical container being rendered.
-