001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041: package org.netbeans.modules.visualweb.propertyeditors.css.model;
042:
043: import javax.swing.DefaultComboBoxModel;
044:
045: /**
046: * Model to hold the presentation data for the position, size & clip Styles
047: * @author Winston Prakash
048: */
049: public class PositionModel {
050:
051: public DefaultComboBoxModel getModeList() {
052: return new ModeList();
053: }
054:
055: public DefaultComboBoxModel getPositionList() {
056: return new PositionList();
057: }
058:
059: public DefaultComboBoxModel getPositionUnitList() {
060: return new PositionUnitList();
061: }
062:
063: public DefaultComboBoxModel getSizeList() {
064: return new SizeList();
065: }
066:
067: public DefaultComboBoxModel getZIndexList() {
068: return new ZIndexList();
069: }
070:
071: public DefaultComboBoxModel getVisibilityList() {
072: return new VisibilityList();
073: }
074:
075: public class PositionList extends DefaultComboBoxModel {
076: public PositionList() {
077: addElement(CssStyleData.NOT_SET);
078: addElement("1"); //NOI18N
079: addElement("2"); //NOI18N
080: addElement("3"); //NOI18N
081: addElement("4"); //NOI18N
082: addElement("5"); //NOI18N
083: addElement("6"); //NOI18N
084: addElement("8"); //NOI18N
085: addElement("10"); //NOI18N
086: addElement(CssStyleData.VALUE);
087: }
088: }
089:
090: public class SizeList extends DefaultComboBoxModel {
091: public SizeList() {
092: addElement(CssStyleData.NOT_SET);
093: addElement("1"); //NOI18N
094: addElement("2"); //NOI18N
095: addElement("3"); //NOI18N
096: addElement("4"); //NOI18N
097: addElement("5"); //NOI18N
098: addElement("6"); //NOI18N
099: addElement("8"); //NOI18N
100: addElement("10"); //NOI18N
101: addElement(CssStyleData.VALUE);
102: }
103: }
104:
105: public class ModeList extends DefaultComboBoxModel {
106: public ModeList() {
107: addElement(CssStyleData.NOT_SET);
108: addElement("absolute"); //NOI18N
109: addElement("static"); //NOI18N
110: addElement("relative"); //NOI18N
111: addElement("fixed"); //NOI18N
112: addElement("inherit"); //NOI18N
113: }
114: }
115:
116: public class ZIndexList extends DefaultComboBoxModel {
117: public ZIndexList() {
118: addElement(CssStyleData.NOT_SET);
119: addElement("1"); //NOI18N
120: addElement("2"); //NOI18N
121: addElement("3"); //NOI18N
122: addElement("4"); //NOI18N
123: addElement("5"); //NOI18N
124: addElement("6"); //NOI18N
125: addElement("8"); //NOI18N
126: addElement("10"); //NOI18N
127: addElement(CssStyleData.VALUE);
128: }
129: }
130:
131: public class VisibilityList extends DefaultComboBoxModel {
132: public VisibilityList() {
133: addElement(CssStyleData.NOT_SET);
134: addElement("visible"); //NOI18N
135: addElement("hidden"); //NOI18N
136: addElement("collapse"); //NOI18N
137: addElement("inherit"); //NOI18N
138: }
139: }
140:
141: public class ClipList extends DefaultComboBoxModel {
142: public ClipList() {
143: addElement(CssStyleData.NOT_SET);
144: addElement("1"); //NOI18N
145: addElement("2"); //NOI18N
146: addElement("3"); //NOI18N
147: addElement("4"); //NOI18N
148: addElement("5"); //NOI18N
149: addElement("6"); //NOI18N
150: addElement("8"); //NOI18N
151: addElement("10"); //NOI18N
152: addElement(CssStyleData.VALUE);
153: }
154: }
155:
156: public class PositionUnitList extends DefaultComboBoxModel {
157: public PositionUnitList() {
158: addElement("px"); //NOI18N
159: addElement("%"); //NOI18N
160: addElement("in"); //NOI18N
161: addElement("cm"); //NOI18N
162: addElement("mm"); //NOI18N
163: addElement("em"); //NOI18N
164: addElement("ex"); //NOI18N
165: addElement("picas"); //NOI18N
166: }
167: }
168: }
|