public class SKDUtility
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SKDUtility.SnapToGridState |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LRE |
static java.lang.String |
LRM |
static java.lang.String |
NONE |
static java.lang.String |
PDF |
static java.lang.String |
RLE |
static java.lang.String |
RLM |
static java.lang.String |
VIEWER_CREWASSIGN |
static java.lang.String |
VIEWER_GRPASSIGN |
static java.lang.String |
VIEWER_SCHEDULER |
Constructor and Description |
---|
SKDUtility() |
Modifier and Type | Method and Description |
---|---|
boolean |
areServerAndUserTZDifferent()
Returns true of server and user timezones are different.
|
void |
callJavascriptEval(java.lang.String eval)
Calls a javascript eval function in the page
|
boolean |
canShowCurrentTimeIndicatorOnDrag()
Returns if we can show current time indicator on drag
|
java.awt.Color |
decodeColor(java.lang.String hexValue)
Decodes color based ona hex value
|
void |
enableHttpOnlyWorkaroundIfNeeded(javax.swing.JApplet applet)
If browser is FF AND http.using.javascript is not set, then set it to true, so that the SerializedDataManager
will use javascript for all communications, to work around the httpOnly issue in Applets.
|
void |
enforceBIDIColumnLayout(javax.swing.JTable table)
Ensures that a
JTable has BIDI support in it's column headers |
java.lang.String |
enforceBidiDirection(java.lang.String str,
java.lang.String bidiDirection)
enforeces Bidi direction by checking charter's directionality
|
void |
enforceOrientation(javax.swing.JComponent comp) |
java.lang.Object |
evalJSResult(javax.swing.JApplet applet,
java.lang.String cmdString) |
void |
fireEscapeKeyDown()
Fires a key event of VK_ESSCAPE Key down.
|
SKDViewerApplet |
getApplet()
Returns handle of the applet
|
java.lang.String |
getAppletName()
Returns applet name
|
java.lang.String |
getAppName()
Get the application name
|
boolean |
getBooleanProperty(java.lang.String propName,
boolean defVal)
Return a boolean property or default value if the property is not found or can't be converted to boolean
|
java.awt.Color |
getColorProperty(java.lang.String propName,
java.awt.Color defaultColor)
Gets a skdviewer.properties color value and decodes it to a
Color . |
ilog.views.gantt.IlvConstraintType |
getConstraintType(java.lang.String num)
Returns constraint type for a designated number.
|
java.lang.Integer |
getConstraintTypeInt(ilog.views.gantt.IlvConstraintType type)
Returns a designated number for a constraint type
|
boolean |
getDailyView()
Gets dailyview value
|
java.util.Date |
getDate(java.util.Locale l,
java.util.TimeZone tz,
java.util.Date date)
Get the data with locale and timezone specified in fparameter.
|
java.text.DateFormat |
getDateFormat(int propDataType)
Returns the current date format.
|
int |
getDefaultRowHeight()
Return default row height for activities
|
boolean |
getDefaultscenario()
Gets snapshot value
|
ilog.views.gantt.graphic.timeindicator.IlvFixedTimeIndicator |
getFixedTimeIndicatorFromGSheet(ilog.views.gantt.graphic.IlvGanttSheet gsheet)
Returns true if the gantt sheet has a fixed indicator inside it
|
IGanttConfigInfo |
getGanttConfigInfo()
Returns IGanttConfigInfo
|
int |
getIntProperty(java.lang.String propName,
int defVal)
Gets a property as an int, or return the default value if the property is not found, or if property
cannot be converted to an int.
|
static ilog.views.chart.IlvStyle[] |
getLegendColors()
Prepares an arrya of ILvStyles that are used as color tables for the resource legend items
|
static ilog.views.chart.IlvStyle[] |
getLegendColorsforResourceHourView()
Prepares an array of ILvStyles that are used as color tables for the resource Hour legend items
|
long |
getLongProperty(java.lang.String propName,
long defVal)
get a property as a long value or return the default value if the property is not found, or if the
property cannot be converted to long value
|
java.lang.String |
getMessage(java.lang.String msgkey)
Returns message for a given key without prefix.
|
SKDAppletMessages |
getMessages()
Returns the SKDApplet Messages object, for fetching messages
|
java.lang.String |
getMessageWithPrefix(java.lang.String msgkey)
Returns message for a given key with prefix.
|
java.lang.String |
getModifiedLabelColorString()
Returns the modified label color as a Hex String prefixed with an octothorpe (#)
|
java.lang.String |
getModifiedLabelPrefix()
Return the Modified label prefix
|
java.awt.Color[] |
getPriorityColors(java.lang.String priority,
java.lang.String groupname)
Returns forground and background color based on the priority of the activity
|
long |
getReservationLiveUpdateThreshold()
Used to disable certain UI features when the reservations exceed a certain size (ie liveupdating
of cost and load charts)
|
java.lang.String |
getResourceString(java.lang.String key)
Returns a given string from the resources strings loaded
|
java.util.Hashtable |
getResourceStrings()
Returns all the resource strings
|
java.util.Date |
getServerDate(java.util.Date oldDate)
Returns server date but based on users timezone;
|
java.util.Date |
getServerDateForUser(java.util.Date serverDate)
Returns server date but based on users timezone;
|
java.util.TimeZone |
getServerTimeZone()
Returns server timezone
|
java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,SKDActionInfo>> |
getSkdActionInfo()
Returns action info
|
java.util.HashMap<java.lang.Long,SKDActionInfo> |
getSkdActionUidInfo()
Returns action unique id info
|
SKDFormat |
getSKDFormat()
Returns handle of SKDformat
|
SKDUserLocaleData |
getSKDUserLocaleData() |
static SKDUtility |
getSKDUtility()
Returns the static instance of this class.
|
boolean |
getSnapshot()
Gets snapshot value
|
int |
getSnapToGridIntervalMins()
Returns the configured Snap To Interval for moving and resizing activities on the gantt view.
|
java.awt.Color[] |
getStatusColors(java.lang.String status,
java.lang.String groupname)
Returns forground and background color based on the status of the activity
|
int |
getToolTipPropertyMaxWidth()
Gets the size to which we should truncate the tooltip
property values for the activity tooltip
|
java.util.Locale |
getUserLocale()
Returns user's locale
|
java.util.TimeZone |
getUserTimeZone()
Returns user's time zone
|
java.lang.String |
getViewerProperty(java.lang.String prop,
java.lang.String defaultValue)
Retrieves a property from the webclient.property file.
|
boolean |
hideDurationCheckEnabled()
Returns true if we should check to hide the duration for GA summary bars
|
boolean |
hidingLegend()
Returns if hiding y-axis on resource load chart
|
boolean |
hidingYAxis()
Returns if hiding y-axis on resource load chart
|
double |
IlvDurationToDouble(ilog.views.gantt.IlvDuration lv)
Convert IlvDuration to a double
|
boolean |
isAssignmentManager()
Returns true if current instance is Graphical Assignment
|
boolean |
isBIDIEnabled()
Returns true if BIDI is enabled
|
static boolean |
isBiDiString(java.lang.String str)
Returns of a given string is BIDI
|
boolean |
isComplianceEnabled()
Is the Scheduler Compliance enabled?
|
boolean |
isDebugMode()
Returns if debug mode is on
|
static boolean |
isEmpty(java.lang.String text)
Simple String isEmpty test
|
boolean |
isFirefox(javax.swing.JApplet applet) |
boolean |
isGUIMirrored()
Returns true if GUI is mirrored
R
|
boolean |
isUsingCompressedData()
Returns true if we should be using gzip compressed data streams for the gantt model.
|
void |
logDebugMessage(java.lang.Object o)
Will throw messages on the Java console, when called from the Applet
Only when Debug paramater is set
|
void |
logDebugMessage(java.lang.String message,
java.lang.Throwable t)
Will throw messages on the Java console, when called from the Applet
Only when Debug paramater is set
|
void |
logMessage(java.lang.String message,
java.lang.Throwable t)
Will throw messages on the Java console, when called from the Applet
|
java.lang.String |
makeTooltipStringBasedOnDirection(java.lang.String direction,
java.lang.String value)
Prepares a string property-value pair enforcing direction
|
java.lang.String |
makeTooltipStringBasedOnDirection(java.lang.String direction,
java.lang.String value,
java.lang.String property)
Prepares a string property-value pair enforcing direction
|
boolean |
needSendModelChange()
need send model change to server ?
|
void |
refreshActivityTable()
Calls a repaint on the activity table
|
static java.lang.String |
removeMarkers(java.lang.String str) |
static java.lang.String |
removeMarkersForApplink(java.lang.String str) |
void |
removeTimeIndicator(ilog.views.gantt.graphic.IlvGanttSheet gSheet)
Removes current timeindicator from the gantt
|
static java.lang.String |
replaceString(java.lang.String str,
java.lang.String pattern,
java.lang.String replacement)
Replace all occurrences of a pattern string with a replacement string.
|
static void |
reset()
Reset/Clear the utility to enable it to be cleared up
|
void |
sendEvent(java.lang.String event)
Sends just an event and not values or hidden inputs
|
void |
sendEvent(java.lang.String event,
java.util.Hashtable<java.lang.String,java.lang.String> values)
Sends event with default applet name
|
void |
sendEvent(java.lang.String event,
java.lang.String target,
java.util.Hashtable<java.lang.String,java.lang.String> values)
Send an event from outside the applet using MAXIMO ui framework javascript calls
|
void |
sendEventAsync(java.lang.String event)
Sends just an event and not values or hidden inputs
|
void |
sendEventAsync(java.lang.String event,
java.util.Hashtable<java.lang.String,java.lang.String> values)
Sends event with default applet name
|
void |
sendEventAsync(java.lang.String event,
java.lang.String target,
java.util.Hashtable<java.lang.String,java.lang.String> values)
Send an event from outside the applet using MAXIMO ui framework javascript calls
|
boolean |
sendToBeSaved()
need send model change to server ?
|
void |
setApplet(SKDViewerApplet applet)
Sets handle of the applet
|
void |
setBIDIEnabled(java.lang.String value)
Returns true if BIDI is enabled
|
void |
setComplianceEnabled(boolean complianceEnabled)
Sets a flag to enable/disable Scheduler Compliance.
|
void |
setDailyView(boolean dailyview)
Sets dailyview value
|
void |
setDateFormat(java.text.DateFormat dateFormat)
Sets Date format
|
void |
setDebugMode(boolean debugMode)
Sets debug mode
|
void |
setDefaultscenario(boolean defaultscenario)
Sets default scenario value
|
boolean |
setDefaultUserTimeZone(java.lang.String userTimeZoneId)
(as per conversation with Krishna -- re java 1.7 build 45, TimeZone.setDefault() security issues --
111423: APPLET- AS A RESULT OF A SECURITY CHANGE IN JAVA 1.7_45, THESCHEDULER/GRAPHICAL ASSIGNMENT, AND Dispatcher Applets will no longer load.)
Sets the default timezome based on the user's TimeZone -- and traps and logs any errors.
|
void |
setGanttConfigInfo(IGanttConfigInfo ganttConfigInfo)
Sets IGanttConfigInfo
|
void |
setGUIMirrored(java.lang.String langcode)
Sets GUI mirrored
|
void |
setSendModelchange(boolean sendModelchange)
Sets a flag to enable/disable Scheduler Compliance.
|
void |
setSkdActionInfo(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,SKDActionInfo>> info)
Sets action info for a given action
|
void |
setSkdActionUidInfo(java.util.HashMap<java.lang.Long,SKDActionInfo> info)
Sets action unique id info
|
void |
setSKDUserLocaleData()
set the user date formatbased user local and timezone
|
void |
setSnapshot(boolean snapshot)
Sets snapshot value
|
void |
setToBeSaved(boolean sendtobesaved)
Sets a flag to enable/disable Scheduler Compliance.
|
void |
setupSnapToGrid(ilog.views.gantt.graphic.IlvGanttSheet ganttSheet)
Adds a key listener to the GanttSheet so that it can notify the Snap To Grid about
the state of the ctrl key, which enables/disables the snapping.
|
void |
setUserOverrideProperties(java.util.Properties props)
Sets the user override properties.
|
void |
setViewerProperty(java.lang.String key,
java.lang.String value)
sets in instance state of a viewer property.
|
java.util.Date |
todaysDate()
Returns todays date;
|
boolean |
usingStatusColors()
Returns if we are using status color
|
public static final java.lang.String VIEWER_SCHEDULER
public static final java.lang.String VIEWER_GRPASSIGN
public static final java.lang.String VIEWER_CREWASSIGN
public static final java.lang.String NONE
public static final java.lang.String LRE
public static final java.lang.String RLE
public static final java.lang.String PDF
public static final java.lang.String LRM
public static final java.lang.String RLM
public SKDViewerApplet getApplet()
public void setApplet(SKDViewerApplet applet)
applet
- public void setDefaultscenario(boolean defaultscenario)
defaultscenario
- boolean valuepublic boolean getDefaultscenario()
public void setSnapshot(boolean snapshot)
snapshot
- boolean valuepublic boolean getSnapshot()
public void setDailyView(boolean dailyview)
dailyview
- boolean valuepublic boolean getDailyView()
public SKDAppletMessages getMessages()
public IGanttConfigInfo getGanttConfigInfo()
public void setGanttConfigInfo(IGanttConfigInfo ganttConfigInfo)
ganttConfigInfo
- public void setSkdActionInfo(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,SKDActionInfo>> info)
info
- public java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,SKDActionInfo>> getSkdActionInfo()
public void setSkdActionUidInfo(java.util.HashMap<java.lang.Long,SKDActionInfo> info)
info
- public java.util.HashMap<java.lang.Long,SKDActionInfo> getSkdActionUidInfo()
public SKDFormat getSKDFormat()
public void setDateFormat(java.text.DateFormat dateFormat)
dateFormat
- public java.util.Locale getUserLocale()
public java.util.TimeZone getUserTimeZone()
public java.util.TimeZone getServerTimeZone()
public static SKDUtility getSKDUtility()
public static void reset()
public boolean isDebugMode()
public void setDebugMode(boolean debugMode)
debugMode
- public void logMessage(java.lang.String message, java.lang.Throwable t)
message
- t
- public void logDebugMessage(java.lang.Object o)
message
- t
- public void logDebugMessage(java.lang.String message, java.lang.Throwable t)
message
- t
- public void sendEventAsync(java.lang.String event)
event
- public void sendEventAsync(java.lang.String event, java.util.Hashtable<java.lang.String,java.lang.String> values)
event
- values
- public void sendEventAsync(java.lang.String event, java.lang.String target, java.util.Hashtable<java.lang.String,java.lang.String> values)
event
- target
- values
- public void sendEvent(java.lang.String event)
event
- public void sendEvent(java.lang.String event, java.util.Hashtable<java.lang.String,java.lang.String> values)
event
- values
- public void sendEvent(java.lang.String event, java.lang.String target, java.util.Hashtable<java.lang.String,java.lang.String> values)
event
- target
- values
- public java.lang.Object evalJSResult(javax.swing.JApplet applet, java.lang.String cmdString)
public boolean isFirefox(javax.swing.JApplet applet)
public void callJavascriptEval(java.lang.String eval)
eval
- The eval stringpublic java.lang.String getMessage(java.lang.String msgkey)
msgkey
- public SKDUserLocaleData getSKDUserLocaleData()
public java.lang.String getMessageWithPrefix(java.lang.String msgkey)
msgkey
- public void setSKDUserLocaleData()
public java.lang.String getResourceString(java.lang.String key)
key
- public java.util.Hashtable getResourceStrings()
public java.text.DateFormat getDateFormat(int propDataType)
public java.lang.String getAppletName()
public ilog.views.gantt.IlvConstraintType getConstraintType(java.lang.String num)
num
- public java.lang.Integer getConstraintTypeInt(ilog.views.gantt.IlvConstraintType type)
IlvConstraintType
- public java.lang.String getViewerProperty(java.lang.String prop, java.lang.String defaultValue)
prop
- -
property to getdefaultValue
- -
default the value to return if the property doesn't exist.public void setViewerProperty(java.lang.String key, java.lang.String value)
public java.awt.Color decodeColor(java.lang.String hexValue)
hexValue
- Stringpublic java.awt.Color[] getStatusColors(java.lang.String status, java.lang.String groupname)
status
- public boolean canShowCurrentTimeIndicatorOnDrag()
public int getSnapToGridIntervalMins()
public int getDefaultRowHeight()
public java.awt.Color[] getPriorityColors(java.lang.String priority, java.lang.String groupname)
status
- public boolean usingStatusColors()
public boolean hidingYAxis()
public boolean hidingLegend()
public double IlvDurationToDouble(ilog.views.gantt.IlvDuration lv) throws java.lang.Exception
lv
- java.lang.Exception
public void enforceOrientation(javax.swing.JComponent comp)
public void enforceBIDIColumnLayout(javax.swing.JTable table)
JTable
has BIDI support in it's column headerstable
- public boolean isGUIMirrored()
public java.lang.String enforceBidiDirection(java.lang.String str, java.lang.String bidiDirection)
str
- String to convertbidiDirection
- RTL or LTRBidiUtils.enforceBidiDirection
public static java.lang.String removeMarkersForApplink(java.lang.String str)
public void setGUIMirrored(java.lang.String langcode)
langcode
- public boolean isBIDIEnabled()
public void setBIDIEnabled(java.lang.String value)
public static java.lang.String replaceString(java.lang.String str, java.lang.String pattern, java.lang.String replacement)
String
- str - String to searchString
- pattern - string to replaceString
- replacement - string to replace patter withpublic java.lang.String makeTooltipStringBasedOnDirection(java.lang.String direction, java.lang.String value, java.lang.String property)
direction
- partA
- partB
- public java.lang.String makeTooltipStringBasedOnDirection(java.lang.String direction, java.lang.String value)
direction
- partA
- partB
- public static java.lang.String removeMarkers(java.lang.String str)
public static boolean isBiDiString(java.lang.String str)
str
- public void fireEscapeKeyDown()
public java.util.Date todaysDate()
public java.util.Date getServerDate(java.util.Date oldDate)
public java.util.Date getServerDateForUser(java.util.Date serverDate)
public java.util.Date getDate(java.util.Locale l, java.util.TimeZone tz, java.util.Date date)
l
- tz
- date
- public ilog.views.gantt.graphic.timeindicator.IlvFixedTimeIndicator getFixedTimeIndicatorFromGSheet(ilog.views.gantt.graphic.IlvGanttSheet gsheet)
gsheet
- public boolean areServerAndUserTZDifferent()
public void removeTimeIndicator(ilog.views.gantt.graphic.IlvGanttSheet gSheet)
gSheet
- public void refreshActivityTable()
public java.lang.String getAppName()
public boolean isAssignmentManager()
public void setupSnapToGrid(ilog.views.gantt.graphic.IlvGanttSheet ganttSheet)
ganttSheet
- IlvGanttChart
on which to attach the Snap Gridpublic int getToolTipPropertyMaxWidth()
public java.lang.String getModifiedLabelColorString()
public java.lang.String getModifiedLabelPrefix()
public boolean isComplianceEnabled()
public void setComplianceEnabled(boolean complianceEnabled)
complianceEnabled
- true to enable compliance, false otherwise.public boolean needSendModelChange()
public void setSendModelchange(boolean sendModelchange)
complianceEnabled
- true to enable compliance, false otherwise.public boolean sendToBeSaved()
public void setToBeSaved(boolean sendtobesaved)
complianceEnabled
- true to enable compliance, false otherwise.public java.awt.Color getColorProperty(java.lang.String propName, java.awt.Color defaultColor)
Color
. The format of the color can be
aaRRGGBB #aaRRGGBB RRGGBB #RRGGBB
propName
- property namedefaultColor
- default color or nullpublic boolean isUsingCompressedData()
public static ilog.views.chart.IlvStyle[] getLegendColors()
public static ilog.views.chart.IlvStyle[] getLegendColorsforResourceHourView()
public boolean getBooleanProperty(java.lang.String propName, boolean defVal)
propName
- defVal
- public long getLongProperty(java.lang.String propName, long defVal)
propName
- defVal
- public int getIntProperty(java.lang.String propName, int defVal)
propName
- defVal
- public void setUserOverrideProperties(java.util.Properties props)
props
- public static boolean isEmpty(java.lang.String text)
public void enableHttpOnlyWorkaroundIfNeeded(javax.swing.JApplet applet)
applet
- public boolean setDefaultUserTimeZone(java.lang.String userTimeZoneId)
userTimeZoneId
- public long getReservationLiveUpdateThreshold()
public boolean hideDurationCheckEnabled()