📄 viewoptionsdata.java
字号:
/** * Copyright 2004 Carlos Silva A. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */package jgantt.model;import java.awt.Font;import java.util.Calendar;import java.util.Date;import jgantt.view.Factory;/** * ViewOptions controla el como la visualizacion debe realizarse. * Ademas calcula cuanta informacion debe mostrarse.</p> * * <p>$Date: 2005/07/18 07:25:10 $</p> * @version $Revision: 1.7 $ * @author Carlos Silva */public class ViewOptionsData { // estado public Date startDate; /// Formato para presentar fechas public String dateFormat = "yyy-MM-dd";//"E, d/MM"; /// Formato para editar fechas public String editDateFormat = "dd/MM/yyyy"; public byte majDivUnit = Calendar.WEEK_OF_YEAR; //WEEK_OF_YEAR;//MONTH; public byte majDivMult = 1; public String majDivFormat = "dd MMM yy"; /** * Opciones * <ul> * <li> %n : name * <li> %c : completed * <li> %s : start * <li> %e : end date * <li> %m : comments * <li> %R : Resources * </ul> */ public String barTextFormat= "%R"; /** * Opciones * <ul> * <li> %n : name * <li> %a : alias * <li> %t : initials * <li> %i : id * <li> %u : units * <li> %h : hours total * <li> %w : hours worked * </ul> */ public String assignTextFormat = "%t[%u%%]"; // divisiones menores public byte minDivUnit = Calendar.DAY_OF_MONTH; public byte minDivMult = 1; public byte minDivFormat = Calendar.DAY_OF_WEEK; // parametros public int divHeight = 12; public int headerHeight = 2 * divHeight + 1; // se suma la linea del medio public int startOffset = -5; public int stdDivWidth = 15; public int divWidth = 10; public int taskHeight = 24; // 18 es el default lgantt hasta 3.5.7 public int taskBarHeight = 18; // 9 es el default lgantt hasta 3.5.7 public Font divFont = Factory.getFont(Font.PLAIN, 10); public Font stdFont = Factory.getFont(Font.PLAIN, 10); public Font bldFont = Factory.getFont(Font.PLAIN, 10); protected int topRow=0; // constantes public static String dayNameLabels[] = { null, "D", "L", "M", "M", "J", "V", "S" }; public static String numberLabels[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }; public static final long msDay = 1000L * 60 * 60 * 24; // 1 dia public static final long msWeek = 1000L * 60 * 60 * 24 * 7; // 7 dias public static final long msMonth = 1000L * 60 * 60 * 24 * 30; // 30 dias public void readFrom(ViewOptionsData vod){ majDivFormat=vod.majDivFormat; majDivMult = vod.majDivMult; majDivUnit = vod.majDivUnit; minDivFormat = vod.minDivFormat; minDivMult = vod.minDivMult; minDivUnit = vod.minDivUnit; divHeight=vod.divHeight; headerHeight = vod.headerHeight; startOffset = vod.startOffset; stdDivWidth = vod.stdDivWidth; divWidth = vod.divWidth; taskBarHeight = vod.taskBarHeight; taskHeight = vod.taskHeight; topRow = vod.topRow; barTextFormat = vod.barTextFormat; assignTextFormat = vod.assignTextFormat; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -