public class HomerLocation extends Parameter
Red (pdf) |
Red (pdf) |
Variable.CircularDependencyError, Variable.VariableScope
NamedObj.ContainedObjectsIterator
Settable.Visibility
_currentExpression, _needsEvaluation, _parserScope, _parseTreeValid, _valueListeners
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
EXPERT, FULL, NONE, NOT_EDITABLE
Constructor and Description |
---|
HomerLocation(NamedObj container)
Create a new location parameter that stores x, y, width, and height.
|
HomerLocation(NamedObj container,
java.lang.String name)
Create a new location parameter that stores x, y, width, and height.
|
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Get the height of the element.
|
int |
getWidth()
Get the width of the element.
|
int |
getX()
Get the relative x position of the top-left corner.
|
int |
getY()
Get the relative y position of the top-left corner.
|
void |
setLocation(int x,
int y,
int width,
int height)
Set the underlying location based on the given values.
|
void |
validateLocation()
Validate the location.
|
addChoice, clone, exportMoML, getChoices, removeAllChoices, removeChoice
_description, _evaluate, _notifyValueListeners, _parseIfNecessary, _propagate, _propagateToValueListeners, _propagateValue, _setToken, _setTokenAndNotify, addValueListener, getDeclaredType, getExpression, getFreeIdentifiers, getParserScope, getScope, getScope, getToken, getType, getTypeTerm, getValueAsString, getVariable, getVisibility, invalidate, isKnown, isLazy, isStringMode, isTypeAcceptable, removeValueListener, reset, setContainer, setExpression, setLazy, setName, setParseTreeEvaluator, setStringMode, setToken, setToken, setTypeAtLeast, setTypeAtLeast, setTypeAtMost, setTypeEquals, setTypeSameAs, setUnknown, setVisibility, stringRepresentation, toString, typeConstraintList, typeConstraints, validate, valueChanged
getDefaultExpression
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, updateContent
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, uniqueName, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDisplayName
description, getContainer, getFullName, getName, getName
public HomerLocation(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of the parameter.IllegalActionException
- If the parameter is not of an
acceptable class for the container.NameDuplicationException
- If the name coincides with a
parameter already in the container.public HomerLocation(NamedObj container) throws IllegalActionException, NameDuplicationException
container
- The container.IllegalActionException
- If the parameter is not of an
acceptable class for the container.NameDuplicationException
- If the location already exist
in that container.public int getX() throws IllegalActionException
MATCH_PARENT = -1 WRAP_CONTENT = -2
IllegalActionException
- If the underlying token is not
an IntMatrixToken.public int getY() throws IllegalActionException
MATCH_PARENT = -1 WRAP_CONTENT = -2
IllegalActionException
- If the underlying token is not
an IntMatrixToken.public int getWidth() throws IllegalActionException
IllegalActionException
- If the underlying token is not
an IntMatrixToken.public int getHeight() throws IllegalActionException
IllegalActionException
- If the underlying token is not
an IntMatrixToken.public void setLocation(int x, int y, int width, int height)
x
- The topleft points horizontal coordinate.y
- The topleft points vertical coordinate.width
- The width of the area.height
- The height of the area.public void validateLocation() throws IllegalActionException
IllegalActionException
- If the location is not valid.