org.netxms.client.maps.elements
Class NetworkMapElement

java.lang.Object
  extended by org.netxms.client.maps.elements.NetworkMapElement
Direct Known Subclasses:
NetworkMapDecoration, NetworkMapObject

public class NetworkMapElement
extends java.lang.Object

Network map element.


Field Summary
protected  long id
           
static int MAP_ELEMENT_DECORATION
           
static int MAP_ELEMENT_GENERIC
           
static int MAP_ELEMENT_OBJECT
           
protected  int type
           
protected  int x
           
protected  int y
           
 
Constructor Summary
  NetworkMapElement(long id)
          Create new generic element
protected NetworkMapElement(NXCPMessage msg, long baseId)
          Create element from NXCP message.
 
Method Summary
static NetworkMapElement createMapElement(NXCPMessage msg, long baseId)
          Factory method for creating map element from NXCP message.
 boolean equals(java.lang.Object obj)
           
 void fillMessage(NXCPMessage msg, long baseId)
          Fill NXCP message with element data
 long getId()
           
 int getType()
           
 int getX()
           
 int getY()
           
 int hashCode()
           
 void setLocation(int x, int y)
          Set elements's location
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAP_ELEMENT_GENERIC

public static final int MAP_ELEMENT_GENERIC
See Also:
Constant Field Values

MAP_ELEMENT_OBJECT

public static final int MAP_ELEMENT_OBJECT
See Also:
Constant Field Values

MAP_ELEMENT_DECORATION

public static final int MAP_ELEMENT_DECORATION
See Also:
Constant Field Values

id

protected long id

type

protected int type

x

protected int x

y

protected int y
Constructor Detail

NetworkMapElement

protected NetworkMapElement(NXCPMessage msg,
                            long baseId)
Create element from NXCP message.

Parameters:
msg - NXCP message
baseId - base variable ID

NetworkMapElement

public NetworkMapElement(long id)
Create new generic element

Method Detail

createMapElement

public static NetworkMapElement createMapElement(NXCPMessage msg,
                                                 long baseId)
Factory method for creating map element from NXCP message.

Parameters:
msg - NXCP message
baseId - base variable ID
Returns:
map element object

fillMessage

public void fillMessage(NXCPMessage msg,
                        long baseId)
Fill NXCP message with element data

Parameters:
msg - NXCP message
baseId - base variable ID

getType

public int getType()
Returns:
the type

getX

public int getX()
Returns:
the x

getY

public int getY()
Returns:
the y

getId

public long getId()
Returns:
the id

setLocation

public void setLocation(int x,
                        int y)
Set elements's location

Parameters:
x -
y -

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2011. All Rights Reserved.