Class NetworkMapElement

java.lang.Object
org.netxms.client.maps.elements.NetworkMapElement
Direct Known Subclasses:
NetworkMapDCIContainer, NetworkMapDCIImage, NetworkMapDecoration, NetworkMapObject, NetworkMapTextBox

public class NetworkMapElement extends Object
Network map element.
  • 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

      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.
      Parameters:
      id - element ID
  • Method Details

    • 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()
      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) coordinate
      y - new Y (vertical) coordinate
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      See Also:
    • 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