Package org.netxms.client.maps.elements
Class NetworkMapElement
java.lang.Object
org.netxms.client.maps.elements.NetworkMapElement
- Direct Known Subclasses:
NetworkMapDCIContainer,NetworkMapDCIImage,NetworkMapDecoration,NetworkMapObject,NetworkMapTextBox
Network map element.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected longstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected intprotected intprotected int -
Constructor Summary
ConstructorsModifierConstructorDescriptionNetworkMapElement(long id) Create new generic element.protectedNetworkMapElement(NXCPMessage msg, long baseId) Create element from NXCP message. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFlag(int flags) static NetworkMapElementcreateMapElement(NXCPMessage msg, long baseId) Factory method for creating map element from NXCP message.booleanvoidfillMessage(NXCPMessage msg, long baseId) Fill NXCP message with element dataintgetFlags()Get element flags.longgetId()Get element ID.intgetType()Get element type.intgetX()Get X (horizontal) coordinate.intgetY()Get Y (vertical) coordinate.inthashCode()voidremoveFlag(int flags) voidsetFlags(int flags) Set element flags.voidsetLocation(int x, int y) Set elements's location
-
Field Details
-
AUTO_GENERATED
public static final int AUTO_GENERATED- See Also:
-
MAP_ELEMENT_GENERIC
public static final int MAP_ELEMENT_GENERIC- See Also:
-
MAP_ELEMENT_OBJECT
public static final int MAP_ELEMENT_OBJECT- See Also:
-
MAP_ELEMENT_DECORATION
public static final int MAP_ELEMENT_DECORATION- See Also:
-
MAP_ELEMENT_DCI_CONTAINER
public static final int MAP_ELEMENT_DCI_CONTAINER- See Also:
-
MAP_ELEMENT_DCI_IMAGE
public static final int MAP_ELEMENT_DCI_IMAGE- See Also:
-
MAP_ELEMENT_TEXT_BOX
public static final int MAP_ELEMENT_TEXT_BOX- See Also:
-
id
protected long id -
type
protected int type -
x
protected int x -
y
protected int y
-
-
Constructor Details
-
NetworkMapElement
Create element from NXCP message.- Parameters:
msg- NXCP messagebaseId- base variable ID
-
NetworkMapElement
public NetworkMapElement(long id) Create new generic element.- Parameters:
id- element ID
-
-
Method Details
-
createMapElement
Factory method for creating map element from NXCP message.- Parameters:
msg- NXCP messagebaseId- base variable ID- Returns:
- map element object
-
fillMessage
Fill NXCP message with element data- Parameters:
msg- NXCP messagebaseId- base variable ID
-
getType
public int getType()Get element type.- Returns:
- element type
-
getX
public int getX()Get X (horizontal) coordinate.- Returns:
- X (horizontal) coordinate
-
getY
public int getY()Get Y (vertical) coordinate.- Returns:
- Y (vertical) coordinate
-
getId
public long getId()Get element ID.- Returns:
- element ID
-
setLocation
public void setLocation(int x, int y) Set elements's location- Parameters:
x- new X (horizontal) coordinatey- new Y (vertical) coordinate
-
equals
-
hashCode
public int hashCode() -
getFlags
public int getFlags()Get element flags.- Returns:
- element flags
-
setFlags
public void setFlags(int flags) Set element flags.- Parameters:
flags- new element flags
-
addFlag
public void addFlag(int flags) - Parameters:
flags- the flag to be added to current flags
-
removeFlag
public void removeFlag(int flags) - Parameters:
flags- the flag
-