📄 ganttoptions.java
字号:
} else if (value.equals("Italiano") || value.equals("it")) { language.setLocale(Locale.ITALY); } else if (value.equals("Japanese") || value.equals("jpn")) { language.setLocale(new Locale("ja", "JP")); } else if (value.equals("T\u00FCrk\u00E7e") || value.equals("tr")) { language.setLocale(new Locale("tr", "TR")); } else if (value.equals("Simplified Chinese") || value.equals("SIMPLIFIED_CHINESE") || value.equals("CHINA") || value.equals("zh_CN")) { language.setLocale(Locale.CHINA); } else if (value.equals("Traditional Chinese") || value.equals("TRADITIONAL_CHINESE") || value.equals("TAIWAN") || value.equals("zh_TW")) { language.setLocale(Locale.TAIWAN); } else if (value.equals("Polski") || value.equals("pl")) { language.setLocale(new Locale("pl", "PL")); } else if (value .equals("\u0420\u0443\u0441\u0441\u043a\u0438\u0439") || value.equals("ru")) { language.setLocale(new Locale("ru", "RU")); } else if (value.equals("Estonian") || value.equals("et")) { language.setLocale(new Locale("et", "ET")); } else if (value.equals("fi")) { language.setLocale(new Locale("fi", "FI")); } else if (value.equals("Hungarian") || value.equals("hu")) { language.setLocale(new Locale("hu", "HU")); } else if (value .equals("\u05d0\u05e0\u05d2\u05dc\u05d9\u05ea") || value.equals("iw")) { language.setLocale(new Locale("iw", "IW")); } else if (value.equals("Slovensky") || value.equals("sk")) { language.setLocale(new Locale("sk", "SK")); } else if (value.equals("Svenska") || value.equals("sv")) { language.setLocale(new Locale("sv", "SV")); } else if (value.equals("Romanian") || value.equals("ro")) { language.setLocale(new Locale("ro", "RO")); } else if (value.equals("Nederlands") || value.equals("nl")) { language.setLocale(new Locale("nl", "NL")); } else if (value.equals("\u010cesky") || value.equals("cz")) { language.setLocale(new Locale("cs", "CZ")); } else if (value.equals("Dansk") || value.equals("da")) { language.setLocale(new Locale("da", "DK")); } } } else if (qName.equals("task-color")) { if (aName.equals("red")) { r = new Integer(value).hashCode(); } else if (aName.equals("green")) { g = new Integer(value).hashCode(); } else if (aName.equals("blue")) { b = new Integer(value).hashCode(); } } else if (qName.equals("geometry")) { if (aName.equals("x")) { x = new Integer(value).hashCode(); } if (aName.equals("y")) { y = new Integer(value).hashCode(); } if (aName.equals("width")) { width = new Integer(value).hashCode(); } if (aName.equals("height")) { height = new Integer(value).hashCode(); } } else if (qName.equals("looknfeel")) { if (aName.equals("name")) { styleName = value; } if (aName.equals("class")) { styleClass = value; } } else if (qName.equals("file")) { if (aName.equals("path")) { documentsMRU.append(myDocumentManager .getDocument(value)); } } else if (qName.equals("automatic-launch")) { if (aName.equals("value")) { automatic = (new Boolean(value)).booleanValue(); } } else if (qName.equals("tips-on-startup")) { if (aName.equals("value")) { openTips = (new Boolean(value)).booleanValue(); } } else if (qName.equals("lockdavminutes")) { if (aName.equals("value")) { lockDAVMinutes = (new Integer(value)).intValue(); } } else if (qName.equals("xsl-dir")) { if (aName.equals("dir")) { if (new File(value).exists()) xslDir = value; } } else if (qName.equals("xsl-fo")) { if (aName.equals("file")) { if (new File(value).exists()) xslFo = value; } } else if (qName.equals("working-dir")) { if (aName.equals("dir")) { if (new File(value).exists()) workingDir = value; } } else if (qName.equals("task-name")) { if (aName.equals("prefix")) sTaskNamePrefix = value; } else if (qName.equals("toolBar")) { if (aName.equals("position")) toolBarPosition = (new Integer(value)).intValue(); else if (aName.equals("icon-size")) iconSize = value; else if (aName.equals("show")) buttonsshow = (new Integer(value)).intValue(); } else if (qName.equals("statusBar")) { if (aName.equals("show")) bShowStatusBar = (new Boolean(value)) .booleanValue(); } else if (qName.equals("export")) { if (aName.equals("name")) bExportName = (new Boolean(value)).booleanValue(); else if (aName.equals("complete")) bExportComplete = (new Boolean(value)) .booleanValue(); else if (aName.equals("relations")) bExportRelations = (new Boolean(value)) .booleanValue(); else if (aName.equals("border3d")) bExport3DBorders = (new Boolean(value)) .booleanValue(); } else if (qName.equals("colors")) { if (aName.equals("resources")) { Color colorR = ColorConvertion .determineColor(value); if (colorR != null) setResourceColor(colorR); } else if (aName.equals("resourcesOverload")) { Color colorR = ColorConvertion .determineColor(value); if (colorR != null) setResourceOverloadColor(colorR); } else if (aName.equals("resourcesUnderload")) { Color colorR = ColorConvertion .determineColor(value); if (colorR != null) setResourceUnderloadColor(colorR); } else if (aName.equals("weekEnd")) { Color colorR = ColorConvertion .determineColor(value); if (colorR != null) setWeekEndColor(colorR); } else if (aName.equals("daysOff")) { Color colorD = ColorConvertion .determineColor(value); if (colorD != null) setDaysOffColor(colorD); } } else if (qName.equals("csv-general")) { if (aName.equals("fixed")) csvOptions.bFixedSize = (new Boolean(value)) .booleanValue(); if (aName.equals("separatedChar")) csvOptions.sSeparatedChar = value; if (aName.equals("separatedTextChar")) csvOptions.sSeparatedTextChar = value; } else if (qName.equals("csv-tasks")) { if (aName.equals("id")) csvOptions.bExportTaskID = (new Boolean(value)) .booleanValue(); if (aName.equals("name")) csvOptions.bExportTaskName = (new Boolean(value)) .booleanValue(); if (aName.equals("start-date")) csvOptions.bExportTaskStartDate = (new Boolean( value)).booleanValue(); if (aName.equals("end-date")) csvOptions.bExportTaskEndDate = (new Boolean(value)) .booleanValue(); if (aName.equals("percent")) csvOptions.bExportTaskPercent = (new Boolean(value)) .booleanValue(); if (aName.equals("duration")) csvOptions.bExportTaskDuration = (new Boolean(value)) .booleanValue(); if (aName.equals("webLink")) csvOptions.bExportTaskWebLink = (new Boolean(value)) .booleanValue(); if (aName.equals("resources")) csvOptions.bExportTaskResources = (new Boolean( value)).booleanValue(); if (aName.equals("notes")) csvOptions.bExportTaskNotes = (new Boolean(value)) .booleanValue(); } else if (qName.equals("csv-resources")) { if (aName.equals("id")) csvOptions.bExportResourceID = (new Boolean(value)) .booleanValue(); if (aName.equals("name")) csvOptions.bExportResourceName = (new Boolean(value)) .booleanValue(); if (aName.equals("mail")) csvOptions.bExportResourceMail = (new Boolean(value)) .booleanValue(); if (aName.equals("phone")) csvOptions.bExportResourcePhone = (new Boolean( value)).booleanValue(); if (aName.equals("role")) csvOptions.bExportResourceRole = (new Boolean(value)) .booleanValue(); } } } // old version of the color version if (qName.equals("task-color")) { // Color color = new Color(r, g, b); // getUIConfiguration().setTaskColor(color); setDefaultTaskColor(new Color(r, g, b)); } if (qName.equals("font")) { String category = attrs.getValue("category"); if ("menu".equals(category)) { myMenuFont = Font.decode(attrs.getValue("spec")); } else if ("chart-main".equals(category)) { myChartMainFont = Font.decode(attrs.getValue("spec")); } } } } private String getFilePath(String value) { String result = null; String filePath; try { URL fileUrl = new URL(value); filePath = fileUrl.getPath(); } catch (MalformedURLException e) { filePath = value; } if (new File(filePath).exists()) { result = filePath; } return result; } /** @return the language. */ public GanttLanguage getLanguage() { return language; } /** @return the default color for tasks. */ public Color getDefaultColor() { return getUIConfiguration().getTaskColor(); } /** @return the color for resources. */ public Color getResourceColor() { return getUIConfiguration().getResourceColor(); } // TODO This method was not used... // /** @return the color for resources overload. */ // public Color getResourceOverloadColor() { // return getUIConfiguration().getResourceOverloadColor(); // } /** @return the lock DAV Minutes. */ public int getLockDAVMinutes() { return lockDAVMinutes; } /** @return the undo number */ public int getUndoNumber() { return undoNumber; } /** @return the working directory. */ public String getWorkingDir() { return workingDir; } /** @return the xsl directory. */ public String getXslDir() { return xslDir; } /** @return the xsl-fo file. */ public String getXslFo() { return (new File(xslFo).exists()) ? xslFo : getClass().getResource( "/xslfo/ganttproject.xsl").toString(); } /** @return if you want to open the tips at the start of GP. */ public boolean getOpenTips() { return openTips; } /** @return if the mouse is used to drag on the chart. */ // public boolean getDragTime() { // return dragTime; // } /** @return automatic launch properties box when create a new task. */ public boolean getAutomatic() { return automatic; } /** @return the lookAndFeel infos. */ public GanttLookAndFeelInfo getLnfInfos() { return lookAndFeel; } /** @return true is options are loaded from the options file. */ public boolean isLoaded() { return isloaded; } /** @return true if show the status bar. */ public boolean getShowStatusBar() { return bShowStatusBar; } /** set show the status bar. */ public void setShowStatusBar(boolean showStatusBar) { bShowStatusBar = showStatusBar; } /** @return the top left x position of the window. */ public int getX() { return x; } /** @return the top left y position of the window. */ public int getY() { return y; } /** @return the width of the window. */ public int getWidth() { return width; } /** @return the height of the window. */ public int getHeight() { return height; } /** @return the cvsOptions. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -