krysalis-jplugin/src/java/org/krysalis/swallowtail/sheets/text JEditSheet.java.fix,NONE,1.1 JEditSheet.java,1.1.1.1,NONE
[email protected] Fri, 18 Apr 2003 01:32:23 -0700
| Newsgroups | gmane.comp.krysalis.sandbox |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/metamorphosis/krysalis-jplugin/src/java/org/krysalis/swallowtail/sheets/text In directory sc8-pr-cvs1:/tmp/cvs-serv14511/src/java/org/krysalis/swallowtail/sheets/text Added Files: JEditSheet.java.fix Removed Files: JEditSheet.java Log Message: Commenting out the jedit sheet for now since it doesn't compile on jdk 1.4.2 --- NEW FILE: JEditSheet.java.fix --- /***************************************************************************** * Copyright (C) The Krysalis project. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Krysalis Software * * License version 1.1_01, a copy of which has been included with this * * distribution in the LICENSE file. * *****************************************************************************/ package org.krysalis.swallowtail.sheets.text; import java.awt.Component; import javax.swing.JComponent; import org.apache.log4j.Category; import JEditTextArea; import XMLTokenMarker; import SQLTokenMarker; import KeywordMap; import HTMLTokenMarker; import JavaScriptTokenMarker; import CTokenMarker; import CCTokenMarker; import BatchFileTokenMarker; import org.krysalis.jplugin.components.sheets.AbstractSaveableComponentSheet; /** *@author <a href="mailto:[email protected]">Nicola Ken Barozzi</a> *@created June 20, 2001 *@version 1.0 */ public class JEditSheet extends AbstractSaveableComponentSheet { private final org.apache.log4j.Category c = org.apache.log4j.Category.getInstance(this.getClass().toString()); private JEditTextArea jEditTextArea; private JComponent jComponent; /** * Creates a new <code>JEditSheet</code>. */ public JEditSheet() { jEditTextArea = new JEditTextArea(); jComponent = jEditTextArea; } /** * Sets the content attribute of the JEditSheet object * *@param content The new content value *@param mimeType The new content value */ public void setContent(String content, String mimeType) { mimeType.trim(); if ("text/xml".equals(mimeType)) { jEditTextArea.setTokenMarker(new XMLTokenMarker()); } else if ("text/sql".equals(mimeType)) { jEditTextArea.setTokenMarker(new SQLTokenMarker(new KeywordMap(true))); } else if ("text/html".equals(mimeType)) { jEditTextArea.setTokenMarker(new HTMLTokenMarker()); } else if ("text/js".equals(mimeType)) { jEditTextArea.setTokenMarker(new JavaScriptTokenMarker()); } else if ("text/c".equals(mimeType)) { jEditTextArea.setTokenMarker(new CTokenMarker()); } else if ("text/cc".equals(mimeType)) { jEditTextArea.setTokenMarker(new CCTokenMarker()); } else if ("text/bat".equals(mimeType)) { jEditTextArea.setTokenMarker(new BatchFileTokenMarker()); } else { jEditTextArea.setTokenMarker(null); } jEditTextArea.setText(content); jEditTextArea.setCaretPosition(0); } /** * Gets the name attribute of the JEditSheet object * *@return The name value */ public String getName() { return "JEdit"; } /** * Gets the component attribute of the JEditSheet object * *@return The component value */ public Component getComponent() { return jComponent; } /** * Gets the content attribute of the JEditSheet object * *@return The content value */ public String getContent() { return jEditTextArea.getText(); } } --- JEditSheet.java DELETED --- ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf