Author: svasilyev
Date: 2007-08-08 12:34:59 -0400 (Wed, 08 Aug 2007)
New Revision: 2980
Added:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/ve/
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/ve/EditorOverride.css
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/ve/init.html
Log:
http://jira.jboss.org/jira/browse/EXIN-235 new resources were added
Added:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
---
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
(rev 0)
+++
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2007-08-08
16:34:59 UTC (rev 2980)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.vpe.editor.util;
+
+/**
+ * @author Sergey Vasilyev (svasilyev(a)exadel.com)
+ *
+ */
+public final class HTML {
+
+ private HTML() {}
+
+ public static final String TAG_HTML = "HTML";
+ public static final String TAG_HEAD = "HEAD";
+ public static final String TAG_BODY = "BODY";
+ public static final String TAG_IMG = "IMG";
+ public static final String TAG_LINK = "LINK";
+ public static final String TAG_SELECT = "SELECT";
+ public static final String TAG_OPTION = "OPTION";
+ public static final String TAG_STYLE = "STYLE";
+ public static final String TAG_TABLE = "TABLE";
+ public static final String TAG_TBODY = "TBODY";
+ public static final String TAG_THEAD = "THEAD";
+ public static final String TAG_TFOOT = "TFOOT";
+ public static final String TAG_TH = "TH";
+ public static final String TAG_TR = "TR";
+ public static final String TAG_TD = "TD";
+ public static final String TAG_COL = "COL";
+ public static final String TAG_COLS = "COLS";
+ public static final String TAG_COLGROUP = "COLGROUP";
+ public static final String TAG_BR = "BR";
+ public static final String TAG_LI = "LI";
+ public static final String TAG_DIV = "DIV";
+ public static final String TAG_SPAN = "SPAN";
+ public static final String TAG_P = "P";
+ public static final String TAG_TEXTAREA = "TEXTAREA";
+ public static final String TAG_INPUT = "INPUT";
+ public static final String TAG_BUTTON = "BUTTON";
+ public static final String TAG_OL = "OL";
+ public static final String TAG_UL = "UL";
+
+
+
+ public static final String ATTR_ID = "ID";
+}
Added:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/ve/EditorOverride.css
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/ve/EditorOverride.css
(rev 0)
+++
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/ve/EditorOverride.css 2007-08-08
16:34:59 UTC (rev 2980)
@@ -0,0 +1,330 @@
+/*
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (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.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is Mozilla Communicator client code, released
+ * March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998-1999 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+/* Styles to alter look of things in the Editor content window
+ * that should NOT be removed when we display in completely WYSIWYG
+ * "Browser Preview" mode.
+ * Anything that should change, like appearance of table borders
+ * and Named Anchors, should be placed in EditorContent.css instead of here.
+*/
+
+/* Primary cursor is text I-beam */
+
+a:link {
+ cursor: text;
+}
+
+/* Use default arrow over objects with size that
+ are selected when clicked on.
+ Override the browser's pointer cursor over links
+*/
+
+img, img[usemap], area,
+object, object[usemap],
+applet, hr, button, input, isindex, textarea, select,
+a:link img, a:visited img, a:active img,
+a[name]:empty {
+ cursor: default;
+}
+
+a:visited, a:active {
+ cursor: text;
+ color : inherit;
+}
+
+a:link img, a:visited img {
+ -moz-user-input: none;
+}
+
+a:link {
+ text-decoration: underline -moz-anchor-decoration;
+ color: -moz-hyperlinktext;
+}
+
+input, button, textarea {
+ -moz-user-select: all !important;
+ -moz-user-input: auto !important;
+ -moz-user-focus: none !important;
+}
+
+select, input[disabled], input[type="checkbox"], input[type="radio"],
input[type="file"] {
+ -moz-user-select: all !important;
+ -moz-user-input: auto !important;
+ -moz-user-focus: none !important;
+}
+
+isindex[prompt]
+{
+ -moz-user-select: none !important;
+ -moz-user-input: none !important;
+ -moz-user-focus: none !important;
+}
+
+input[type="hidden"] {
+ border: 1px solid black !important;
+ visibility: visible !important;
+}
+
+/*
+label {
+ -moz-user-select: all !important;
+}
+*/
+
+::-moz-display-comboboxcontrol-frame {
+ -moz-user-select: text !important;
+}
+
+option {
+ -moz-user-select: text !important;
+}
+
+#mozToc.readonly {
+ -moz-user-select: all !important;
+ -moz-user-input: none !important;
+}
+
+span[\_moz_anonclass="mozResizer"] {
+ width: 5px;
+ height: 5px;
+ position: absolute;
+ border: 1px black solid;
+ background-color: white;
+ -moz-user-select: none;
+ z-index: 2147483646;
+}
+
+span[\_moz_anonclass="mozResizer"][\_moz_activated],
+span[\_moz_anonclass="mozResizer"]:hover {
+ background-color: black;
+}
+
+span[\_moz_anonclass="mozResizer"].hidden,
+span[\_moz_anonclass="mozResizingShadow"].hidden,
+img[\_moz_anonclass="mozResizingShadow"].hidden,
+span[\_moz_anonclass="mozGrabber"].hidden,
+span[\_moz_anonclass="mozResizingInfo"].hidden,
+a[\_moz_anonclass="mozTableRemoveRow"].hidden,
+a[\_moz_anonclass="mozTableRemoveColumn"].hidden {
+ display: none !important;
+}
+
+span[\_moz_anonclass="mozResizer"][anonlocation="nw"] {
+ cursor: nw-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="n"] {
+ cursor: n-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="ne"] {
+ cursor: ne-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="w"] {
+ cursor: w-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="e"] {
+ cursor: e-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="sw"] {
+ cursor: sw-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="s"] {
+ cursor: s-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="se"] {
+ cursor: se-resize;
+}
+
+span[\_moz_anonclass="mozResizingShadow"],
+img[\_moz_anonclass="mozResizingShadow"] {
+ -moz-outline: thin dashed black;
+ -moz-user-select: none;
+ -moz-opacity: 0.5;
+ position: absolute;
+ z-index: 2147483647;
+}
+
+span[\_moz_anonclass="mozResizingInfo"] {
+ font-family: sans-serif;
+ font-size: x-small;
+ color: black;
+ background-color: #d0d0d0;
+ border: ridge 2px #d0d0d0;
+ padding: 2px;
+ position: absolute;
+ z-index: 2147483647;
+}
+
+*[\_moz_abspos] {
+ -moz-outline: silver ridge 2px;
+ z-index: 2147483645 !important;
+}
+*[\_moz_abspos="white"] {
+ background-color: white !important;
+}
+*[\_moz_abspos="black"] {
+ background-color: black !important;
+}
+
+span[\_moz_anonclass="mozGrabber"] {
+ -moz-outline: ridge 2px silver;
+ padding: 2px;
+ position: absolute;
+ width: 12px;
+ height: 12px;
+ background-image: url("resource:/res/grabber.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none;
+ cursor: move;
+}
+
+a[\_moz_anonclass="mozTableAddColumnBefore"] {
+ position: absolute;
+ z-index: 2147483647;
+ text-decoration: none !important;
+ border: none 0px !important;
+ width: 4px;
+ height: 8px;
+ background-image: url("resource:/res/table-add-column-before.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none !important;
+ -moz-user-focus: none !important;
+}
+
+a[\_moz_anonclass="mozTableAddColumnBefore"]:hover {
+ background-image: url("resource:/res/table-add-column-before-hover.gif");
+}
+
+a[\_moz_anonclass="mozTableAddColumnBefore"]:active {
+ background-image: url("resource:/res/table-add-column-before-active.gif");
+}
+
+a[\_moz_anonclass="mozTableAddColumnAfter"] {
+ position: absolute;
+ z-index: 2147483647;
+ text-decoration: none !important;
+ border: none 0px !important;
+ width: 4px;
+ height: 8px;
+ background-image: url("resource:/res/table-add-column-after.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none !important;
+ -moz-user-focus: none !important;
+}
+
+a[\_moz_anonclass="mozTableAddColumnAfter"]:hover {
+ background-image: url("resource:/res/table-add-column-after-hover.gif");
+}
+
+a[\_moz_anonclass="mozTableAddColumnAfter"]:active {
+ background-image: url("resource:/res/table-add-column-after-active.gif");
+}
+
+a[\_moz_anonclass="mozTableRemoveColumn"] {
+ position: absolute;
+ z-index: 2147483647;
+ text-decoration: none !important;
+ border: none 0px !important;
+ width: 8px;
+ height: 8px;
+ background-image: url("resource:/res/table-remove-column.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none !important;
+ -moz-user-focus: none !important;
+}
+
+a[\_moz_anonclass="mozTableRemoveColumn"]:hover {
+ background-image: url("resource:/res/table-remove-column-hover.gif");
+}
+
+a[\_moz_anonclass="mozTableRemoveColumn"]:active {
+ background-image: url("resource:/res/table-remove-column-active.gif");
+}
+
+a[\_moz_anonclass="mozTableAddRowBefore"] {
+ position: absolute;
+ z-index: 2147483647;
+ text-decoration: none !important;
+ border: none 0px !important;
+ width: 8px;
+ height: 4px;
+ background-image: url("resource:/res/table-add-row-before.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none !important;
+ -moz-user-focus: none !important;
+}
+
+a[\_moz_anonclass="mozTableAddRowBefore"]:hover {
+ background-image: url("resource:/res/table-add-row-before-hover.gif");
+}
+
+a[\_moz_anonclass="mozTableAddRowBefore"]:active {
+ background-image: url("resource:/res/table-add-row-before-active.gif");
+}
+
+a[\_moz_anonclass="mozTableAddRowAfter"] {
+ position: absolute;
+ z-index: 2147483647;
+ text-decoration: none !important;
+ border: none 0px !important;
+ width: 8px;
+ height: 4px;
+ background-image: url("resource:/res/table-add-row-after.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none !important;
+ -moz-user-focus: none !important;
+}
+
+a[\_moz_anonclass="mozTableAddRowAfter"]:hover {
+ background-image: url("resource:/res/table-add-row-after-hover.gif");
+}
+
+a[\_moz_anonclass="mozTableAddRowAfter"]:active {
+ background-image: url("resource:/res/table-add-row-after-active.gif");
+}
+
+a[\_moz_anonclass="mozTableRemoveRow"] {
+ position: absolute;
+ z-index: 2147483647;
+ text-decoration: none !important;
+ border: none 0px !important;
+ width: 8px;
+ height: 8px;
+ background-image: url("resource:/res/table-remove-row.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none !important;
+ -moz-user-focus: none !important;
+}
+
+a[\_moz_anonclass="mozTableRemoveRow"]:hover {
+ background-image: url("resource:/res/table-remove-row-hover.gif");
+}
+
+a[\_moz_anonclass="mozTableRemoveRow"]:active {
+ background-image: url("resource:/res/table-remove-row-active.gif");
+}
Added: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/ve/init.html
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/ve/init.html
(rev 0)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/ve/init.html 2007-08-08
16:34:59 UTC (rev 2980)
@@ -0,0 +1,97 @@
+<html>
+
+<head>
+ <title>Test Page</title>
+ <script src="mozileLoader.js"
type="text/javascript"></script>
+ <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
+
+ <link href="EditorOverride.css" rel="stylesheet"
type="text/css">
+
+<style type="text/css" vpe="yes">
+<!--
+ .__any__tag__block {
+ display:block;
+ border: 1px solid black;
+ margin: 1px 1px 1px 1px;
+ padding: 2px 1px 1px 1px;
+ }
+ .__any__tag__caption {
+ color:#006727;
+ font-size: 12px;
+ padding: 0px 2px 0px 2px;
+ -moz-user-modify: read-only;
+ }
+ .__any__tag__inline {
+ display: inline;
+ border: 1px solid black;
+ margin: 2px 1px 1px 1px;
+ }
+ .__any__tag__none {
+ display: none;
+ }
+
+ #__content__area__ {
+ width:100%;
+ height:100%;
+ min-height:50px;
+ margin:0px;
+ padding:0px;
+ -moz-user-modify: read-write;
+ -moz-user-input: enabled;
+ -moz-user-select: normal;
+ }
+ .__button__tag {
+ background-color: buttonface;
+ padding: 2px 9px 2px 9px;
+ text-align: center;
+ border: 2px outset threedface;
+ font-family: "MS Sans Serif";
+ font-size: 13.3333px;
+ line-height:1.85;
+ }
+ .__input__tag {
+ background-color: window;
+ text-align: left;
+ border: 2px inset threedface;
+ font-family: "MS Sans Serif";
+ font-size: 13.3333px;
+ line-height:1.6;
+ -moz-user-select: normal;
+ }
+-->
+</style>
+</head>
+
+<script language="JavaScript">
+<!--
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+ var prefs =
Components.classes['(a)mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefService).getBranch(null);
+
+ if(!prefs.getBoolPref('accessibility.browsewithcaret'))
+ prefs.setBoolPref('accessibility.browsewithcaret', true);
+
+ if(prefs.getBoolPref('browser.cache.enable'))
+ prefs.setBoolPref('browser.cache.enable', false);
+
+ if(prefs.getBoolPref('browser.cache.disk.enable'))
+ prefs.setBoolPref('browser.cache.disk.enable', false);
+
+ prefs.setIntPref('browser.cache.disk.capacity', 0);
+
+ if(prefs.getBoolPref('browser.cache.memory.enable'))
+ prefs.setBoolPref('browser.cache.memory.enable', false);
+
+ // -1 = determine dynamically, 0 = none, n = memory capacity in kilobytes
+ prefs.setIntPref('browser.cache.memory.capacity', 0);
+
+ // 0 = once-per-session, 1 = each-time, 2 = never, 3 = when-appropriate/automatically
+ prefs.setIntPref('browser.cache.check_doc_frequency', 2);
+
+ if(prefs.getBoolPref('network.http.use-cache'))
+ prefs.setBoolPref('network.http.use-cache', false);
+//-->
+</script>
+
+<body id="__content__area__"></body>
+
+</html>