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
Modifier and TypeFieldDescriptionstatic final int
protected long
static final int
static final int
static final int
static final int
static final int
static final int
protected int
protected int
protected int
-
Constructor Summary
ModifierConstructorDescriptionNetworkMapElement
(long id) Create new generic element.protected
NetworkMapElement
(NXCPMessage msg, long baseId) Create element from NXCP message. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFlag
(int flags) static NetworkMapElement
createMapElement
(NXCPMessage msg, long baseId) Factory method for creating map element from NXCP message.boolean
void
fillMessage
(NXCPMessage msg, long baseId) Fill NXCP message with element dataint
getFlags()
Get element flags.long
getId()
Get element ID.int
getType()
Get element type.int
getX()
Get X (horizontal) coordinate.int
getY()
Get Y (vertical) coordinate.int
hashCode()
void
removeFlag
(int flags) void
setFlags
(int flags) Set element flags.void
setLocation
(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
-