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 |
protected java.util.TimeZone |
servertimezone |
protected static SKDUtility |
skdu |
protected java.util.Locale |
userlocale
Locale is used to interpet date and time queries
|
protected java.util.Properties |
userOverrideProperties |
protected java.util.TimeZone |
usertimezone
TimeZone is used to interpet date and time queries
|
Constructor and Description |
---|
SKDUtility() |
Modifier and Type | Method and Description |
---|---|
boolean |
areServerAndUserTZDifferent()
Returns true of server and user timezones are different.
|
java.awt.Color |
decodeColor(java.lang.String hexValue)
Decodes color based ona hex value
|
void |
enforceOrientation(javax.swing.JComponent comp) |
java.awt.Color |
getColorProperty(java.lang.String propName,
java.awt.Color defaultColor)
Gets a skdviewer.properties color value and decodes it to a
Color . |
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.
|
boolean |
getDefaultscenario()
Gets snapshot value
|
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
|
SKDFormat |
getSKDFormat()
Returns handle of SKDformat
|
static SKDUtility |
getSKDUtility()
Returns the static instance of this class.
|
boolean |
getSnapshot()
Gets snapshot value
|
int |
getSnapToGridIntervalMins(UISerializationHelper helper)
Returns the configured Snap To Interval for moving and resizing activities on the gantt view.
|
java.util.Locale |
getUserLocale()
Returns user's locale
|
java.util.TimeZone |
getUserTimeZone()
Returns user's time zone
|
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 |
isGUIMirrored()
Returns true if GUI is mirrored
R
|
boolean |
needSendModelChange()
need send model change to server ?
|
static java.lang.String |
removeMarkers(java.lang.String str) |
static java.lang.String |
removeMarkersForApplink(java.lang.String str) |
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
|
boolean |
sendToBeSaved()
need send model change to server ?
|
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 |
setDebugMode(boolean debugMode)
Sets debug mode
|
void |
setDefaultscenario(boolean defaultscenario)
Sets default scenario value
|
void |
setGUIMirrored(java.lang.String langcode)
Sets GUI mirrored
|
void |
setSendModelchange(boolean sendModelchange)
Sets a flag to enable/disable Scheduler Compliance.
|
void |
setSnapshot(boolean snapshot)
Sets snapshot value
|
void |
setToBeSaved(boolean sendtobesaved)
Sets a flag to enable/disable Scheduler Compliance.
|
java.util.Date |
todaysDate()
Returns todays date;
|
protected static SKDUtility skdu
protected java.util.Locale userlocale
protected java.util.TimeZone usertimezone
protected java.util.TimeZone servertimezone
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
protected java.util.Properties userOverrideProperties
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 SKDFormat getSKDFormat()
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 java.lang.String getResourceString(java.lang.String key)
key
- public java.util.Hashtable getResourceStrings()
public java.awt.Color decodeColor(java.lang.String hexValue)
hexValue
- Stringpublic void enforceOrientation(javax.swing.JComponent comp)
public boolean isGUIMirrored()
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 static java.lang.String removeMarkers(java.lang.String str)
public static boolean isBiDiString(java.lang.String str)
str
- 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 boolean areServerAndUserTZDifferent()
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 static boolean isEmpty(java.lang.String text)
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 int getSnapToGridIntervalMins(UISerializationHelper helper)