org.netxms.client.datacollection
Class GraphSettings

java.lang.Object
  extended by org.netxms.client.datacollection.GraphSettings

public class GraphSettings
extends java.lang.Object

Settings for predefined graph


Field Summary
static int GF_AUTO_SCALE
           
static int GF_AUTO_UPDATE
           
static int GF_ENABLE_ZOOM
           
static int GF_LOG_SCALE
           
static int GF_SHOW_GRID
           
static int GF_SHOW_HOST_NAMES
           
static int GF_SHOW_LEGEND
           
static int GF_SHOW_RULER
           
static int GF_SHOW_TOOLTIPS
           
static int MAX_GRAPH_ITEM_COUNT
           
static int POSITION_BOTTOM
           
static int POSITION_LEFT
           
static int POSITION_RIGHT
           
static int POSITION_TOP
           
static int TIME_FRAME_BACK_FROM_NOW
           
static int TIME_FRAME_FIXED
           
static int TIME_UNIT_DAY
           
static int TIME_UNIT_HOUR
           
static int TIME_UNIT_MINUTE
           
 
Constructor Summary
GraphSettings()
          Create default settings
GraphSettings(NXCPMessage msg, long baseId)
          Create graph settings object from NXCP message
 
Method Summary
 void addChangeListener(GraphSettingsChangeListener listener)
          Add change listener
 void fireChangeNotification()
          Fire change notification
 java.util.List<AccessListElement> getAccessList()
           
 int getAutoRefreshInterval()
           
 int getAxisColor()
           
 int getBackgroundColor()
           
 int getFlags()
           
 int getGridColor()
           
 long getId()
           
 GraphItem[] getItems()
           
 GraphItemStyle[] getItemStyles()
           
 int getLegendPosition()
           
 java.lang.String getName()
           
 long getOwnerId()
           
 int getRulerColor()
           
 int getSelectionColor()
           
 java.lang.String getShortName()
           
 int getTextColor()
           
 int getTimeFrame()
           
 int getTimeFrameType()
           
 java.util.Date getTimeFrom()
           
 long getTimeRangeMillis()
          Get time range covered by graph in milliseconds
 java.util.Date getTimeTo()
           
 int getTimeUnit()
           
 java.lang.String getTitle()
           
 boolean isAutoRefresh()
          Get auto refresh mode
 boolean isAutoScale()
          Get auto scale mode
 boolean isGridVisible()
          Get grid display mode
 boolean isHostNamesVisible()
          Get host name display mode
 boolean isLegendVisible()
          Get legend show mode
 boolean isLogScale()
          Get logarithmic scale mode
 boolean isTooltipsEnabled()
          Get tooltips mode
 boolean isZoomEnabled()
          Get zoom mode
 void removeChangeListener(GraphSettingsChangeListener listener)
          Remove change listener
 void setAutoRefresh(boolean enable)
          Set or clear automatic refresh flag
 void setAutoRefreshInterval(int autoRefreshInterval)
           
 void setAutoScale(boolean enable)
          Enable or disable automatic scaling
 void setAxisColor(int axisColor)
           
 void setBackgroundColor(int backgroundColor)
           
 void setFlags(int flags)
           
 void setGridColor(int gridColor)
           
 void setGridVisible(boolean enable)
          Show or hide grid
 void setHostNamesVisible(boolean enable)
          Show or hide host names in legend
 void setItems(GraphItem[] items)
           
 void setItemStyles(GraphItemStyle[] itemStyles)
           
 void setLegendPosition(int legendPosition)
           
 void setLegendVisible(boolean enable)
          Show or hide legend
 void setLogScale(boolean enable)
          Enable or disable log scale usage flag
 void setName(java.lang.String name)
           
 void setRulerColor(int rulerColor)
           
 void setSelectionColor(int selectionColor)
           
 void setShortName(java.lang.String shortName)
           
 void setTextColor(int textColor)
           
 void setTimeFrame(int timeFrame)
           
 void setTimeFrameType(int timeFrameType)
           
 void setTimeFrom(java.util.Date timeFrom)
           
 void setTimeTo(java.util.Date timeTo)
           
 void setTimeUnit(int timeUnit)
           
 void setTitle(java.lang.String title)
           
 void setTooltipsEnabled(boolean enable)
          Enable or disable tooltips
 void setZoomEnabled(boolean enable)
          Enable or disable zooming
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_GRAPH_ITEM_COUNT

public static final int MAX_GRAPH_ITEM_COUNT
See Also:
Constant Field Values

TIME_FRAME_FIXED

public static final int TIME_FRAME_FIXED
See Also:
Constant Field Values

TIME_FRAME_BACK_FROM_NOW

public static final int TIME_FRAME_BACK_FROM_NOW
See Also:
Constant Field Values

TIME_UNIT_MINUTE

public static final int TIME_UNIT_MINUTE
See Also:
Constant Field Values

TIME_UNIT_HOUR

public static final int TIME_UNIT_HOUR
See Also:
Constant Field Values

TIME_UNIT_DAY

public static final int TIME_UNIT_DAY
See Also:
Constant Field Values

GF_AUTO_UPDATE

public static final int GF_AUTO_UPDATE
See Also:
Constant Field Values

GF_AUTO_SCALE

public static final int GF_AUTO_SCALE
See Also:
Constant Field Values

GF_SHOW_GRID

public static final int GF_SHOW_GRID
See Also:
Constant Field Values

GF_SHOW_LEGEND

public static final int GF_SHOW_LEGEND
See Also:
Constant Field Values

GF_SHOW_RULER

public static final int GF_SHOW_RULER
See Also:
Constant Field Values

GF_SHOW_HOST_NAMES

public static final int GF_SHOW_HOST_NAMES
See Also:
Constant Field Values

GF_LOG_SCALE

public static final int GF_LOG_SCALE
See Also:
Constant Field Values

GF_SHOW_TOOLTIPS

public static final int GF_SHOW_TOOLTIPS
See Also:
Constant Field Values

GF_ENABLE_ZOOM

public static final int GF_ENABLE_ZOOM
See Also:
Constant Field Values

POSITION_LEFT

public static final int POSITION_LEFT
See Also:
Constant Field Values

POSITION_RIGHT

public static final int POSITION_RIGHT
See Also:
Constant Field Values

POSITION_TOP

public static final int POSITION_TOP
See Also:
Constant Field Values

POSITION_BOTTOM

public static final int POSITION_BOTTOM
See Also:
Constant Field Values
Constructor Detail

GraphSettings

public GraphSettings()
Create default settings


GraphSettings

public GraphSettings(NXCPMessage msg,
                     long baseId)
Create graph settings object from NXCP message

Parameters:
msg - NXCP message
baseId - base variable id
Method Detail

isLogScale

public boolean isLogScale()
Get logarithmic scale mode

Returns:
true if logarithmic scale mode is on

setLogScale

public void setLogScale(boolean enable)
Enable or disable log scale usage flag

Parameters:
enable - true to enable log scale

isAutoRefresh

public boolean isAutoRefresh()
Get auto refresh mode

Returns:
true if auto refresh is on

setAutoRefresh

public void setAutoRefresh(boolean enable)
Set or clear automatic refresh flag

Parameters:
enable - true to enable automatic refresh

isGridVisible

public boolean isGridVisible()
Get grid display mode

Returns:
true if grid should be shown

setGridVisible

public void setGridVisible(boolean enable)
Show or hide grid

Parameters:
enable - true to show grid

isHostNamesVisible

public boolean isHostNamesVisible()
Get host name display mode

Returns:
true if host names should be shown

setHostNamesVisible

public void setHostNamesVisible(boolean enable)
Show or hide host names in legend

Parameters:
enable - true to show host names in legend

isLegendVisible

public boolean isLegendVisible()
Get legend show mode

Returns:
true if legend should be shown

setLegendVisible

public void setLegendVisible(boolean enable)
Show or hide legend

Parameters:
enable - true to show legend

isTooltipsEnabled

public boolean isTooltipsEnabled()
Get tooltips mode

Returns:
true if tooltips should be shown

setTooltipsEnabled

public void setTooltipsEnabled(boolean enable)
Enable or disable tooltips

Parameters:
enable - true to show tooltips

isZoomEnabled

public boolean isZoomEnabled()
Get zoom mode

Returns:
true if zooming is enabled

setZoomEnabled

public void setZoomEnabled(boolean enable)
Enable or disable zooming

Parameters:
enable - true to enable zoom

isAutoScale

public boolean isAutoScale()
Get auto scale mode

Returns:
true if auto scale is on

setAutoScale

public void setAutoScale(boolean enable)
Enable or disable automatic scaling

Parameters:
enable - true to enable automatic scaling

getId

public long getId()
Returns:
the id

getOwnerId

public long getOwnerId()
Returns:
the ownerId

getName

public java.lang.String getName()
Returns:
the name

getAccessList

public java.util.List<AccessListElement> getAccessList()
Returns:
the accessList

getShortName

public java.lang.String getShortName()
Returns:
the shortName

getFlags

public int getFlags()
Returns:
the flags

getTimeFrameType

public int getTimeFrameType()
Returns:
the timeFrameType

getTimeUnit

public int getTimeUnit()
Returns:
the timeUnit

getTimeFrame

public int getTimeFrame()
Returns:
the timeFrame

getTimeFrom

public java.util.Date getTimeFrom()
Returns:
the timeFrom

getTimeTo

public java.util.Date getTimeTo()
Returns:
the timeTo

getAutoRefreshInterval

public int getAutoRefreshInterval()
Returns:
the autoRefreshInterval

getAxisColor

public int getAxisColor()
Returns:
the axisColor

getBackgroundColor

public int getBackgroundColor()
Returns:
the backgroundColor

getGridColor

public int getGridColor()
Returns:
the gridColor

getSelectionColor

public int getSelectionColor()
Returns:
the selectionColor

getTextColor

public int getTextColor()
Returns:
the textColor

getRulerColor

public int getRulerColor()
Returns:
the rulerColor

getTitle

public java.lang.String getTitle()
Returns:
the title

getItemStyles

public GraphItemStyle[] getItemStyles()
Returns:
the itemStyles

getItems

public GraphItem[] getItems()
Returns:
the items

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

setShortName

public void setShortName(java.lang.String shortName)
Parameters:
shortName - the shortName to set

setFlags

public void setFlags(int flags)
Parameters:
flags - the flags to set

setTimeFrameType

public void setTimeFrameType(int timeFrameType)
Parameters:
timeFrameType - the timeFrameType to set

setTimeUnit

public void setTimeUnit(int timeUnit)
Parameters:
timeUnit - the timeUnit to set

setTimeFrame

public void setTimeFrame(int timeFrame)
Parameters:
timeFrame - the timeFrame to set

setTimeFrom

public void setTimeFrom(java.util.Date timeFrom)
Parameters:
timeFrom - the timeFrom to set

setTimeTo

public void setTimeTo(java.util.Date timeTo)
Parameters:
timeTo - the timeTo to set

setAutoRefreshInterval

public void setAutoRefreshInterval(int autoRefreshInterval)
Parameters:
autoRefreshInterval - the autoRefreshInterval to set

setAxisColor

public void setAxisColor(int axisColor)
Parameters:
axisColor - the axisColor to set

setBackgroundColor

public void setBackgroundColor(int backgroundColor)
Parameters:
backgroundColor - the backgroundColor to set

setGridColor

public void setGridColor(int gridColor)
Parameters:
gridColor - the gridColor to set

setSelectionColor

public void setSelectionColor(int selectionColor)
Parameters:
selectionColor - the selectionColor to set

setTextColor

public void setTextColor(int textColor)
Parameters:
textColor - the textColor to set

setRulerColor

public void setRulerColor(int rulerColor)
Parameters:
rulerColor - the rulerColor to set

setTitle

public void setTitle(java.lang.String title)
Parameters:
title - the title to set

setItemStyles

public void setItemStyles(GraphItemStyle[] itemStyles)
Parameters:
itemStyles - the itemStyles to set

setItems

public void setItems(GraphItem[] items)
Parameters:
items - the items to set

getTimeRangeMillis

public long getTimeRangeMillis()
Get time range covered by graph in milliseconds

Returns:

getLegendPosition

public int getLegendPosition()
Returns:
the legendPosition

setLegendPosition

public void setLegendPosition(int legendPosition)
Parameters:
legendPosition - the legendPosition to set

addChangeListener

public void addChangeListener(GraphSettingsChangeListener listener)
Add change listener

Parameters:
listener - change listener

removeChangeListener

public void removeChangeListener(GraphSettingsChangeListener listener)
Remove change listener

Parameters:
listener - change listener to remove

fireChangeNotification

public void fireChangeNotification()
Fire change notification



Copyright © 2011. All Rights Reserved.