Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritrimble2006-10-30 18:59:16 +0000
committeritrimble2006-10-30 18:59:16 +0000
commit38bf0b94a9097fc95b4b875bc8f1c9c881bd53e8 (patch)
tree3441d21142de85a91748c8f8299c17ad152ae6b5 /jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/range/RangeStyleSupport.java
parent676c1fe37e7743b8edcb79b521e6f965f05d0ce8 (diff)
downloadwebtools.jsf-38bf0b94a9097fc95b4b875bc8f1c9c881bd53e8.tar.gz
webtools.jsf-38bf0b94a9097fc95b4b875bc8f1c9c881bd53e8.tar.xz
webtools.jsf-38bf0b94a9097fc95b4b875bc8f1c9c881bd53e8.zip
Initial contribution.
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/range/RangeStyleSupport.java')
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/range/RangeStyleSupport.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/range/RangeStyleSupport.java b/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/range/RangeStyleSupport.java
new file mode 100644
index 000000000..754870ac6
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/range/RangeStyleSupport.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.actions.range;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jst.pagedesigner.PDPlugin;
+import org.eclipse.jst.pagedesigner.viewer.DesignRange;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class RangeStyleSupport {
+ public static final String[] ActionLabel = new String[] {
+ PDPlugin.getResourceString("RangeStyleSupport.ActionLabel.Bold"),//$NON-NLS-1$
+ PDPlugin.getResourceString("RangeStyleSupport.ActionLabel.Italic"),//$NON-NLS-1$
+ PDPlugin
+ .getResourceString("RangeStyleSupport.ActionLabel.Underline"), }; //$NON-NLS-1$
+
+ public static final String[] HtmlTag = new String[] { "STRONG", "I", "U", }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ public static final String[] CSSProperty = new String[] {
+ "font-weight", "font-style", "text-decoration", }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ public static final String[] CSSValue = new String[] { "bolder", "italic",
+ "underline", };
+
+ public static void createRangeStyleActions(IMenuManager menu,
+ DesignRange range) {
+ for (int i = 0; i < ActionLabel.length; i++) {
+ RangeStyleAction action = new RangeStyleAction(ActionLabel[i],
+ range, HtmlTag[i], CSSProperty[i], CSSValue[i]);
+
+ menu.add(action);
+ }
+ }
+}

Back to the top