public class SubstitutionEditor
extends javax.swing.JFrame
RhombDisplays equal to
(Point.N() - 1)/2, each of which represents the image under
a substitution rule of one of the rhombic prototiles.
There is a panel underneath containing a PatchDisplay depicting
a generic patch of a tiling arising from this substitution.
Modifying the rules causes the patch to change in real time.javax.swing.JFrame.AccessibleJFramejava.awt.Window.AccessibleAWTWindow, java.awt.Window.Type| Modifier and Type | Field and Description |
|---|---|
static int |
HEIGHT
The height of this window.
|
static int |
WIDTH
The width of this window.
|
static int |
XBUFFER
The horizontal space between adjacent
RhombDisplays. |
static int |
XMARGE
The horizontal space between the edge of the window and the displays.
|
static int |
YBUFFER
The vertical space between the
RhombDisplays on top and
the PatchDisplay on the bottom. |
static int |
YMARGE
The vertical space between the edge of the window and the displays.
|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabledCROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSORBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
SubstitutionEditor(java.util.List<SimpleRhomb> rhombs,
int[] edge,
int maxSubstitutions)
Constructor that takes only the edge sequence and seed as input.
|
SubstitutionEditor(java.util.List<SimpleRhomb> rhombs,
java.util.List<RhombBoundary> RB,
int[] edge)
Constructor with default maximum of 2 substitutions.
|
SubstitutionEditor(java.util.List<SimpleRhomb> rhombs,
java.util.List<RhombBoundary> RB,
int[] edge,
int maxSubstitutions)
Constructor that takes a list of substitution rules as input.
|
| Modifier and Type | Method and Description |
|---|---|
static SubstitutionEditor |
createSubstitutionEditor(int[] edge)
Static factory method, default maximum number of substitutions (2).
|
static SubstitutionEditor |
createSubstitutionEditor(int[] edge,
int maxSubstitutions)
Static factory method.
|
SubstitutionEditorSaveState |
dump()
Utility method for saving.
|
java.util.List<SimpleRhomb> |
getPatch()
Return the SimpleRhombs that are showing in the window.
|
static SubstitutionEditor |
loadSubstitutionEditor(java.lang.String fileName)
Create a new SubstitutionEditor from a saved state.
|
static SubstitutionEditor |
open(SubstitutionEditor editor)
Static method for producing a pop-up prompt to open a saved
SubstitutionEditor.
|
static void |
save(SubstitutionEditor editor)
Static method for producing a pop-up prompt to save the given
SubstitutionEditor.
|
void |
SaveAction()
Take a screenshot, save it to file.
|
static int |
savePrompt()
Static method for producing a pop-up prompt asking the user
if he or she wants to save before proceeding.
|
static java.util.List<SimpleRhomb> |
standardSeed()
Output a standard seed for a substitution: a list consisting of a single big rhomb.
|
void |
updatePatch()
Update the
PatchDisplay in this. |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateaddNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final int WIDTH
public static final int HEIGHT
public static final int XMARGE
public static final int XBUFFER
RhombDisplays.public static final int YBUFFER
RhombDisplays on top and
the PatchDisplay on the bottom.public static final int YMARGE
public SubstitutionEditor(java.util.List<SimpleRhomb> rhombs, java.util.List<RhombBoundary> RB, int[] edge, int maxSubstitutions)
public SubstitutionEditor(java.util.List<SimpleRhomb> rhombs, java.util.List<RhombBoundary> RB, int[] edge)
public SubstitutionEditor(java.util.List<SimpleRhomb> rhombs, int[] edge, int maxSubstitutions)
public static SubstitutionEditor loadSubstitutionEditor(java.lang.String fileName)
fileName - The name of the file containing the saved state.public static java.util.List<SimpleRhomb> standardSeed()
public static SubstitutionEditor createSubstitutionEditor(int[] edge, int maxSubstitutions)
public static SubstitutionEditor createSubstitutionEditor(int[] edge)
public SubstitutionEditorSaveState dump()
SubstitutionEditorSaveState containing essential fields
needed to reconstruct this.public void updatePatch()
PatchDisplay in this.
Calls PatchDisplay.update(int).public java.util.List<SimpleRhomb> getPatch()
public static int savePrompt()
public static void save(SubstitutionEditor editor)
editor - The current editor, which the user might wish
to save.public static SubstitutionEditor open(SubstitutionEditor editor)
editor - The SubstitutionEditor that called this method.public void SaveAction()