protected static class RigidShapeBuilder.AbstractShapeBuilderController extends WWObjectImpl implements ActionListener, MouseListener, CaretListener
Modifier and Type | Field and Description |
---|---|
protected boolean |
aboveGround |
protected RigidShapeBuilder.AppFrame |
app |
protected String |
editMode |
protected AbstractShapeEditor |
editor |
protected boolean |
enabled |
protected boolean |
enableEdit |
protected RigidShapeBuilder.AbstractShapeBuilderModel |
model |
protected boolean |
resizeNewShapes |
protected RigidShapeBuilder.AbstractShapeEntry |
selectedEntry |
protected RigidShapeBuilder.AbstractShapeBuilderPanel |
view |
Constructor and Description |
---|
AbstractShapeBuilderController(RigidShapeBuilder.AppFrame app) |
onMessage, propertyChange
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
protected boolean aboveGround
protected RigidShapeBuilder.AppFrame app
protected String editMode
protected AbstractShapeEditor editor
protected boolean enabled
protected boolean enableEdit
protected RigidShapeBuilder.AbstractShapeBuilderModel model
protected boolean resizeNewShapes
protected RigidShapeBuilder.AbstractShapeEntry selectedEntry
protected RigidShapeBuilder.AbstractShapeBuilderPanel view
public AbstractShapeBuilderController(RigidShapeBuilder.AppFrame app)
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void addEntry(RigidShapeBuilder.AbstractShapeEntry entry)
public void caretUpdate(CaretEvent e)
caretUpdate
in interface CaretListener
public void createNewEntry(RigidShapeBuilder.AbstractShapeFactory factory)
protected void doOpenImageFile()
public AbstractShapeEditor getActiveEditor()
public RigidShapeBuilder.AppFrame getApp()
public String getEditMode()
protected RigidShapeBuilder.AbstractShapeEntry[] getEntriesFor(int[] indices)
protected RigidShapeBuilder.AbstractShapeEntry getEntryFor(AbstractShape shape)
public String getImageSource()
public RigidShapeBuilder.AbstractShapeBuilderModel getModel()
protected RigidShapeBuilder.AbstractShapeEntry[] getSelectedEntries()
public RigidShapeBuilder.AbstractShapeEntry getSelectedEntry()
public RigidShapeBuilder.AbstractShapeBuilderPanel getView()
protected void handleAboveGround(boolean enable)
protected void handleEnableEdit(boolean enable)
protected void handleSelect()
public boolean isAboveGround()
public boolean isEnabled()
public boolean isEnableEdit()
public boolean isResizeNewShapesToViewport()
protected boolean isSelectionEditing()
protected void loadFile(File file)
protected void loadFiles(File[] files)
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
protected void openFromFile()
protected BufferedImage readImage(File file)
public void removeEntries(Iterable<? extends RigidShapeBuilder.AbstractShapeEntry> entries)
public void removeEntry(RigidShapeBuilder.AbstractShapeEntry entry)
protected void saveToFile()
public void selectEntry(RigidShapeBuilder.AbstractShapeEntry entry, boolean updateView)
public void setAboveGround(boolean enable)
public void setActiveEditor(AbstractShapeEditor editor)
public void setEditMode(String mode)
public void setEnabled(boolean enabled)
public void setEnableEdit(boolean enable)
public void setImageSource(String imageSource)
public void setModel(RigidShapeBuilder.AbstractShapeBuilderModel model)
public void setResizeNewShapesToViewport(boolean resize)
protected void setSelectedEntry(RigidShapeBuilder.AbstractShapeEntry entry)
protected void setSelectionEditing(boolean editing)
public void setView(RigidShapeBuilder.AbstractShapeBuilderPanel view)
protected void viewSelectionChanged()