Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /antelope/src/ise/antelope/app/, /antelope/src/ise/antelope/app/jedit/

antelope
Discussion topic

Back to topic list

CVS update: /antelope/src/ise/antelope/app/, /antelope/src/ise/antelope/app/jedit/

Author danson
Full name Dale Anson
Date 2004-02-15 18:39:43 PST
Message User: danson
Date: 04/02/15 18:39:43

Added:
 /antelope/src/ise/antelope/app/
  AboutDialog.java, Antelope.java, AntelopeGUILogHandler.java,
  AntelopeSyntaxUtilities.java, FindDialog.java, OptionChooser.java,
  OptionSettings.java, StyleEditor.java, SyntaxChooser.java
 /antelope/src/ise/an​telope/app/jedit/
  DefaultInputHandler.java, FindAndReplace.java, InputHandler.java,
  JEditTextArea.java, KeywordMap.java, SyntaxDocument.java, SyntaxStyle.java,
  SyntaxUtilities.java, TextAreaDefaults.java, TextAreaPainter.java,
  TextUtilities.java, Token.java, TokenMarker.java, XMLTokenMarker.java

Log:
 added Antelope app files

File Changes:

Directory: /antelope/src/ise/antelope/app/
====================​====================​==

File [added]: AboutDialog.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/AboutDial​og.java?rev=1.1&​content-type=text/vn​d.viewcvs-markup
Added lines: 0
--------------

File [added]: Antelope.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/Antelope.​java?rev=1.1&con​tent-type=text/vnd.v​iewcvs-markup
Added lines: 0
--------------

File [added]: AntelopeGUILogHandler.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/AntelopeG​UILogHandler.java?re​v=1.1&content-ty​pe=text/vnd.viewcvs-​markup
Added lines: 0
--------------

File [added]: AntelopeSyntaxUtilities.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/AntelopeS​yntaxUtilities.java?​rev=1.1&content-​type=text/vnd.viewcv​s-markup
Added lines: 136
----------------
package ise.antelope.app;

import java.awt.Color;

import ise.antelope.common.Constants;
import ise.antelope.app.jed​it.SyntaxUtilities;
import ise.antelope.app.jed​it.SyntaxStyle;
import ise.antelope.app.jedit.Token;

public class AntelopeSyntaxUtilities extends SyntaxUtilities
    implements Constants {

    public static SyntaxStyle getDefaultSyntaxStyle( int id ) {
        SyntaxStyle[] defaults = getDefaultSyntaxStyles();
        return defaults[ id ];
    }

    public static SyntaxStyle getSyntaxStyle( int id ) {
        SyntaxStyle[] styles = getStoredStyles();
        return styles[ id ];
    }
    
    public static int getStyleId(SyntaxStyle ss) {
        SyntaxStyle[] styles = getStoredStyles();
        for (int i = 0; i < styles.length; i++) {
            if (ss.equals(styles[i]))
                return i;
        }
        styles = getDefaultSyntaxStyles();
        for (int i = 0; i < styles.length; i++) {
            if (ss.equals(styles[i]))
                return i;
        }
        return -1;
    }

    public static SyntaxStyle[] getStoredStyles() {
        SyntaxStyle[] defaults = getDefaultSyntaxStyles();
        SyntaxStyle[] styles = new SyntaxStyle[ Token.ID_COUNT ];

        styles[ Token.COMMENT1 ] = new SyntaxStyle(
                    new Color( PREFS.getInt( COMMENT1 + COLOR, defaults[ Token.COMMENT1 ].getColor().getRGB() ) ),
                    PREFS.getBoolean( COMMENT1 + ITALIC, defaults[ Token.COMMENT1 ].isItalic() ),
                    PREFS.getBoolean( COMMENT1 + BOLD, defaults[ Token.COMMENT1 ].isBold() ) );

        styles[ Token.COMMENT2 ] = new SyntaxStyle(
                    new Color( PREFS.getInt( COMMENT2 + COLOR, defaults[ Token.COMMENT2 ].getColor().getRGB() ) ),
                    PREFS.getBoolean( COMMENT2 + ITALIC, defaults[ Token.COMMENT2 ].isItalic() ),
                    PREFS.getBoolean( COMMENT2 + BOLD, defaults[ Token.COMMENT2 ].isBold() ) );

        styles[ Token.KEYWORD1 ] = new SyntaxStyle(
                    new Color( PREFS.getInt( KEYWORD1 + COLOR, defaults[ Token.KEYWORD1 ].getColor().getRGB() ) ),
                    PREFS.getBoolean( KEYWORD1 + ITALIC, defaults[ Token.KEYWORD1 ].isItalic() ),
                    PREFS.getBoolean( KEYWORD1 + BOLD, defaults[ Token.KEYWORD1 ].isBold() ) );

        styles[ Token.KEYWORD2 ] = new SyntaxStyle(
                    new Color( PREFS.getInt( KEYWORD2 + COLOR, defaults[ Token.KEYWORD2 ].getColor().getRGB() ) ),
                    PREFS.getBoolean( KEYWORD2 + ITALIC, defaults[ Token.KEYWORD2 ].isItalic() ),
                    PREFS.getBoolean( KEYWORD2 + BOLD, defaults[ Token.KEYWORD2 ].isBold() ) );

        styles[ Token.KEYWORD3 ] = new SyntaxStyle(
                    new Color( PREFS.getInt( KEYWORD3 + COLOR, defaults[ Token.KEYWORD3 ].getColor().getRGB() ) ),
                    PREFS.getBoolean( KEYWORD3 + ITALIC, defaults[ Token.KEYWORD3 ].isItalic() ),
                    PREFS.getBoolean( KEYWORD3 + BOLD, defaults[ Token.KEYWORD3 ].isBold() ) );

        styles[ Token.LITERAL1 ] = new SyntaxStyle(
                    new Color( PREFS.getInt( LITERAL1 + COLOR, defaults[ Token.LITERAL1 ].getColor().getRGB() ) ),
                    PREFS.getBoolean( LITERAL1 + ITALIC, defaults[ Token.LITERAL1 ].isItalic() ),
                    PREFS.getBoolean( LITERAL1 + BOLD, defaults[ Token.LITERAL1 ].isBold() ) );

        styles[ Token.LITERAL2 ] = new SyntaxStyle(
                    new Color( PREFS.getInt( LITERAL2 + COLOR, defaults[ Token.LITERAL2 ].getColor().getRGB() ) ),
                    PREFS.getBoolean( LITERAL2 + ITALIC, defaults[ Token.LITERAL2 ].isItalic() ),
                    PREFS.getBoolean( LITERAL2 + BOLD, defaults[ Token.LITERAL2 ].isBold() ) );

        styles[ Token.LABEL ] = new SyntaxStyle(
                    new Color( PREFS.getInt( LABEL + COLOR, defaults[ Token.LABEL ].getColor().getRGB() ) ),
                    PREFS.getBoolean( LABEL + ITALIC, defaults[ Token.LABEL ].isItalic() ),
                    PREFS.getBoolean( LABEL + BOLD, defaults[ Token.LABEL ].isBold() ) );

        styles[ Token.OPERATOR ] = new SyntaxStyle(
                    new Color( PREFS.getInt( OPERATOR + COLOR, defaults[ Token.OPERATOR ].getColor().getRGB() ) ),
                    PREFS.getBoolean( OPERATOR + ITALIC, defaults[ Token.OPERATOR ].isItalic() ),
                    PREFS.getBoolean( OPERATOR + BOLD, defaults[ Token.OPERATOR ].isBold() ) );

        styles[ Token.INVALID ] = new SyntaxStyle(
                    new Color( PREFS.getInt( INVALID + COLOR, defaults[ Token.INVALID ].getColor().getRGB() ) ),
                    PREFS.getBoolean( INVALID + ITALIC, defaults[ Token.INVALID ].isItalic() ),
                    PREFS.getBoolean( INVALID + BOLD, defaults[ Token.INVALID ].isBold() ) );

        return styles;
    }

    public static void storeStyles( SyntaxStyle[] styles ) {

        PREFS.putInt( COMMENT1 + COLOR, styles[ Token.COMMENT1 ].getColor().getRGB() );
        PREFS.putBoolean( COMMENT1 + ITALIC, styles[ Token.COMMENT1 ].isItalic() );
        PREFS.putBoolean( COMMENT1 + BOLD, styles[ Token.COMMENT1 ].isBold() );

        PREFS.putInt( COMMENT2 + COLOR, styles[ Token.COMMENT2 ].getColor().getRGB() );
        PREFS.putBoolean( COMMENT2 + ITALIC, styles[ Token.COMMENT2 ].isItalic() );
        PREFS.putBoolean( COMMENT2 + BOLD, styles[ Token.COMMENT2 ].isBold() );

        PREFS.putInt( KEYWORD1 + COLOR, styles[ Token.KEYWORD1 ].getColor().getRGB() );
        PREFS.putBoolean( KEYWORD1 + ITALIC, styles[ Token.KEYWORD1 ].isItalic() );
        PREFS.putBoolean( KEYWORD1 + BOLD, styles[ Token.KEYWORD1 ].isBold() );

        PREFS.putInt( KEYWORD2 + COLOR, styles[ Token.KEYWORD2 ].getColor().getRGB() );
        PREFS.putBoolean( KEYWORD2 + ITALIC, styles[ Token.KEYWORD2 ].isItalic() );
        PREFS.putBoolean( KEYWORD2 + BOLD, styles[ Token.KEYWORD2 ].isBold() );

        PREFS.putInt( KEYWORD3 + COLOR, styles[ Token.KEYWORD3 ].getColor().getRGB() );
        PREFS.putBoolean( KEYWORD3 + ITALIC, styles[ Token.KEYWORD3 ].isItalic() );
        PREFS.putBoolean( KEYWORD3 + BOLD, styles[ Token.KEYWORD3 ].isBold() );

        PREFS.putInt( LITERAL1 + COLOR, styles[ Token.LITERAL1 ].getColor().getRGB() );
        PREFS.putBoolean( LITERAL1 + ITALIC, styles[ Token.LITERAL1 ].isItalic() );
        PREFS.putBoolean( LITERAL1 + BOLD, styles[ Token.LITERAL1 ].isBold() );

        PREFS.putInt( LITERAL2 + COLOR, styles[ Token.LITERAL2 ].getColor().getRGB() );
        PREFS.putBoolean( LITERAL2 + ITALIC, styles[ Token.LITERAL2 ].isItalic() );
        PREFS.putBoolean( LITERAL2 + BOLD, styles[ Token.LITERAL2 ].isBold() );

        PREFS.putInt( LABEL + COLOR, styles[ Token.LABEL ].getColor().getRGB() );
        PREFS.putBoolean( LABEL + ITALIC, styles[ Token.LABEL ].isItalic() );
        PREFS.putBoolean( LABEL + BOLD, styles[ Token.LABEL ].isBold() );

        PREFS.putInt( OPERATOR + COLOR, styles[ Token.OPERATOR ].getColor().getRGB() );
        PREFS.putBoolean( OPERATOR + ITALIC, styles[ Token.OPERATOR ].isItalic() );
        PREFS.putBoolean( OPERATOR + BOLD, styles[ Token.OPERATOR ].isBold() );

        PREFS.putInt( INVALID + COLOR, styles[ Token.INVALID ].getColor().getRGB() );
        PREFS.putBoolean( INVALID + ITALIC, styles[ Token.INVALID ].isItalic() );
        PREFS.putBoolean( INVALID + BOLD, styles[ Token.INVALID ].isBold() );
    }
}

File [added]: FindDialog.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/FindDialo​g.java?rev=1.1&c​ontent-type=text/vnd​.viewcvs-markup
Added lines: 0
--------------

File [added]: OptionChooser.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/OptionCho​oser.java?rev=1.1​&content-type=text/​vnd.viewcvs-markup
Added lines: 197
----------------
package ise.antelope.app;

import ise.antelope.common.Constants;
import ise.antelope.app.jed​it.JEditTextArea;
import ise.antelope.app.jed​it.TextAreaPainter;
import ise.antelope.app.jed​it.InputHandler;
import ise.library.KappaLayout;
import ise.library.GUIUtils;

import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.*;
import javax.swing.border.EmptyBorder;


/**
 * Support these option settings, using the values shown here as the defaults:
 * boolean caretBlinks = true;
 * Color caretColor = Color.black;
 * int electricScroll = 3;
 * boolean useSmartHome = false;
 * Color selectionColor = new Color( 0xccccff ) ;
 * Color lineHighlightColor = new Color( 0xe0e0e0 ) ;
 * boolean showLineHighlight = true;
 * Color bracketHighlightColor = Color.black;
 * boolean showBracketHighlight = false;
 * Color eolMarkerColor = new Color( 0x009999 ) ;
 * boolean showEolMarker = false;
 * textArea.setClientPr​operty(InputHandler.​SMART_HOME_END_PROPE​RTY, true)
 */
public class OptionChooser extends JDialog implements Constants {

    private JEditTextArea editor;

    private OptionChooser( JFrame parent, JEditTextArea t ) {
        super( parent );
        editor = t;
        setModal( true );
        setResizable( false );
        setTitle( "Editor Options" );

        KappaLayout layout = new KappaLayout();
        JPanel pane = new JPanel( layout );
        pane.setBorder( new EmptyBorder( 11, 11, 11, 11 ) );
        setContentPane( pane );

        final OptionSettings settings = new OptionSettings();
        settings.load();

        final JCheckBox caretBlinks_cb = new JCheckBox( "Caret blinks" );
        final JButton caretColor_btn = new JButton();
        final JSpinner tabSize_sp = new JSpinner( new SpinnerNumberModel( 4, 0, 12, 1 ) );
        final JSpinner electricScroll_sp = new JSpinner( new SpinnerNumberModel( 3, 0, 10, 1 ) );
        final JCheckBox useSmartHome_cb = new JCheckBox( "Use BRIEF-style home/end" );
        final JButton selectionColor_btn = new JButton();
        final JButton lineHighlightColor_btn = new JButton();
        final JCheckBox showLineHighlight_cb = new JCheckBox( "Show line highlight" );
        final JButton bracketHighlightColor_btn = new JButton();
        final JCheckBox showBracketHighlight_cb = new JCheckBox( "Highlight matching brackets" );
        final JButton eolMarkerColor_btn = new JButton();
        final JCheckBox showEolMarker_cb = new JCheckBox( "Show end of line marker" );

        caretBlinks_cb.setSelected( settings.getCaretBlinks() );
        caretColor_btn.setBackground( settings.getCaretColor() );
        useSmartHome_cb.setSelected( settings.useSmartHome() );
        selectionColor_btn.s​etBackground( settings.getSelectionColor() );
        lineHighlightColor_b​tn.setBackground( settings.getLineHigh​lightColor() );
        showLineHighlight_cb​.setSelected( settings.showLineHighlight() );
        lineHighlightColor_b​tn.setEnabled( showLineHighlight_cb​.isSelected() );
        bracketHighlightColo​r_btn.setBackground(​ settings.getBracketH​ighlightColor() );
        showBracketHighlight​_cb.setSelected( settings.showBracketHighlight() );
        bracketHighlightColo​r_btn.setEnabled( showBracketHighlight​_cb.isSelected() );
        showEolMarker_cb.setSelected( settings.showEolMarker() );
        eolMarkerColor_btn.s​etBackground( settings.getEolMarkerColor() );
        eolMarkerColor_btn.setEnabled( showEolMarker_cb.isSelected() );

        pane.add( caretBlinks_cb, "0, 0, 1, 1, W, 0, 3" );
        pane.add( new JLabel( "Caret color" ), "0, 1, 1, 1, W, 0, 3" );
        pane.add( caretColor_btn, "1, 1, 1, 1, 0, wh, 3" );
        pane.add( new JLabel( "Tab size" ), "0, 2, 1, 1, W, 0, 3" );
        pane.add( tabSize_sp, "1, 2, 1, 1, 0, wh, 3" );
        pane.add( new JLabel( "Electric scroll height" ), "0, 3, 1, 1, W, 0, 3" );
        pane.add( electricScroll_sp, "1, 3, 1, 1, 0, wh, 3" );
        pane.add( useSmartHome_cb, "0, 4, 1, 1, W, 0, 3" );
        pane.add( new JLabel( "Selection color" ), "0, 5, 1, 1, W, 0, 3" );
        pane.add( selectionColor_btn, "1, 5, 1, 1, 0, wh, 3" );
        pane.add( showLineHighlight_cb, "0, 6, 1, 1, W, 0, 3" );
        pane.add( lineHighlightColor_btn, "1, 6, 1, 1, 0, wh, 3" );
        pane.add( showBracketHighlight_cb, "0, 7, 1, 1, W, 0, 3" );
        pane.add( bracketHighlightColor_btn, "1, 7, 1, 1, 0, wh, 3" );
        pane.add( showEolMarker_cb, "0, 8, 1, 1, W, 0, 3" );
        pane.add( eolMarkerColor_btn, "1, 8, 1, 1, 0, wh, 3" );
        layout.makeRowsSameHeight();

        KappaLayout kl = new KappaLayout();
        JPanel btn_panel = new JPanel( kl );
        JButton ok_btn = new JButton( "OK" );
        JButton apply_btn = new JButton( "Apply" );
        JButton cancel_btn = new JButton( "Cancel" );
        btn_panel.add( ok_btn, "0, 0, 1, 1, 0, wh, 3" );
        btn_panel.add( apply_btn, "1, 0, 1, 1, 0, wh, 3" );
        btn_panel.add( cancel_btn, "2, 0, 1, 1, 0, wh, 3" );
        kl.makeColumnsSameWidth();
        pane.add( KappaLayout.createVe​rticalStrut( 17 ), "0, 9" );
        pane.add( btn_panel, "0, 10, 2, 1, 0, 0, 6" );

        ActionListener al = new ActionListener() {
                    public void actionPerformed( ActionEvent ae ) {
                        JButton btn = ( JButton ) ae.getSource();
                        Color color = JColorChooser.showDialog( OptionChooser.this,
                                "Pick Color", btn.getBackground() );
                        if ( color != null ) {
                            btn.setBackground( color );
                        }
                    }
                };
        caretColor_btn.addAc​tionListener( al );
        selectionColor_btn.a​ddActionListener( al );
        lineHighlightColor_b​tn.addActionListener​( al );
        bracketHighlightColo​r_btn.addActionListe​ner( al );
        eolMarkerColor_btn.a​ddActionListener( al );

        showLineHighlight_cb​.addActionListener( new ActionListener() {
                    public void actionPerformed( ActionEvent ae ) {
                        lineHighlightColor_b​tn.setEnabled( showLineHighlight_cb​.isSelected() );
                    }
                }
                                              );
        showBracketHighlight​_cb.addActionListene​r( new ActionListener() {
                    public void actionPerformed( ActionEvent ae ) {
                        bracketHighlightColo​r_btn.setEnabled( showBracketHighlight​_cb.isSelected() );
                    }
                }
                                                 );
        showEolMarker_cb.add​ActionListener( new ActionListener() {
                    public void actionPerformed( ActionEvent ae ) {
                        eolMarkerColor_btn.setEnabled( showEolMarker_cb.isSelected() );
                    }
                }
                                          );

        final ActionListener apply_action = new ActionListener() {
                    public void actionPerformed( ActionEvent ae ) {
                        TextAreaPainter tap = editor.getPainter();
                        tap.setCaretColor( caretColor_btn.getBackground() );
                        editor.setElectricScroll( ( ( Integer ) electricScroll_sp.getValue() ).intValue() );
                        editor.getDocument()​.putProperty( javax.swing.text.Pla​inDocument.tabSizeAt​tribute, ( Integer ) tabSize_sp.getValue() );
                        editor.putClientProperty( InputHandler.SMART_H​OME_END_PROPERTY, new Boolean( useSmartHome_cb.isSelected() ) );
                        tap.setSelectionColor( selectionColor_btn.g​etBackground() );
                        tap.setLineHighlightColor( lineHighlightColor_b​tn.getBackground() );
                        tap.setLineHighlightEnabled( showLineHighlight_cb​.isSelected() );
                        tap.setBracketHighlightEnabled( showBracketHighlight​_cb.isSelected() );
                        tap.setBracketHighlightColor( bracketHighlightColo​r_btn.getBackground(​) );
                        tap.setEOLMarkersPainted( showEolMarker_cb.isSelected() );
                        tap.setEOLMarkerColor( eolMarkerColor_btn.g​etBackground() );

                        settings.setCaretColor( caretColor_btn.getBackground( ) );
                        settings.setUseSmartHome( useSmartHome_cb.isSelected( ) );
                        settings.setElectricScroll( ( ( Integer ) electricScroll_sp.getValue() ).intValue() );
                        settings.setTabSize( ( ( Integer ) tabSize_sp.getValue() ).intValue() );
                        settings.setSelectionColor( selectionColor_btn.g​etBackground( ) );
                        settings.setLineHighlightColor( lineHighlightColor_b​tn.getBackground( ) );
                        settings.setShowLineHighlight( showLineHighlight_cb​.isSelected( ) );
                        settings.setBracketH​ighlightColor( bracketHighlightColo​r_btn.getBackground(​ ) );
                        settings.setShowBrac​ketHighlight( showBracketHighlight​_cb.isSelected( ) );
                        settings.setEolMarkerColor( eolMarkerColor_btn.g​etBackground( ) );
                        settings.setShowEolMarker( showEolMarker_cb.isSelected( ) );
                        settings.save();
                    }
                };
        final ActionListener close_action = new ActionListener() {
                    public void actionPerformed( ActionEvent ae ) {
                        setVisible( false );
                        dispose();
                    }
                };
        ActionListener ok_action = new ActionListener() {
                    public void actionPerformed( ActionEvent ae ) {
                        apply_action.actionPerformed( null );
                        close_action.actionPerformed( null );
                    }
                };
        ok_btn.addActionListener( ok_action );
        apply_btn.addActionListener( apply_action );
        cancel_btn.addActionListener( close_action );

        pack();
        GUIUtils.center( parent, this );
        setVisible( true );
    }

    public static OptionChooser showDialog( JFrame parent, JEditTextArea editor ) {
        OptionChooser c = new OptionChooser( parent, editor );
        return c;
    }
}

File [added]: OptionSettings.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/OptionSet​tings.java?rev=1.1​&content-type=text​/vnd.viewcvs-markup
Added lines: 187
----------------
package ise.antelope.app;

import ise.antelope.app.jed​it.JEditTextArea;
import ise.antelope.app.jed​it.TextAreaPainter;
import ise.antelope.app.jed​it.InputHandler;
import ise.antelope.common.Constants;
import java.awt.Color;

/**
 * Bad, Dale, bad. You have another class named OptionSettings in the
 * ise.antelope.common package.
 */
public class OptionSettings implements Constants {

   private boolean caretBlinks = true;
   private Color caretColor = Color.black;
   private int electricScroll = 3;
   private int tabSize = 4;
   private boolean useSmartHome = false;
   private Color selectionColor = new Color( 0xccccff ) ;
   private Color lineHighlightColor = new Color( 0xe0e0e0 ) ;
   private boolean showLineHighlight = true;
   private Color bracketHighlightColor = Color.black;
   private boolean showBracketHighlight = false;
   private Color eolMarkerColor = new Color( 0x009999 ) ;
   private boolean showEolMarker = false;

   public boolean getCaretBlinks() {
      return caretBlinks;
   }

   public void setCaretBlinks( boolean b ) {
      caretBlinks = b;
   }

   public Color getCaretColor() {
      return caretColor;
   }

   public void setCaretColor( Color c ) {
      caretColor = c;
   }

   public int getElectricScroll() {
      return electricScroll;
   }

   public void setElectricScroll( int i ) {
      electricScroll = i;
   }

   public int getTabSize() {
      return tabSize;
   }

   public void setTabSize( int i ) {
      tabSize = i;
   }

   public boolean useSmartHome() {
      return useSmartHome;
   }

   public void setUseSmartHome( boolean b ) {
      useSmartHome = b;
   }

   public Color getSelectionColor() {
      return selectionColor;
   }

   public void setSelectionColor( Color c ) {
      selectionColor = c;
   }

   public Color getLineHighlightColor() {
      return lineHighlightColor;
   }

   public void setLineHighlightColor( Color c ) {
      lineHighlightColor = c;
   }

   public boolean showLineHighlight() {
      return showLineHighlight;
   }

   public void setShowLineHighlight( boolean b ) {
      showLineHighlight = b;
   }

   public Color getBracketHighlightColor() {
      return bracketHighlightColor;
   }

   public void setBracketHighlightColor( Color c ) {
      bracketHighlightColor = c;
   }

   public boolean showBracketHighlight() {
      return showBracketHighlight;
   }

   public void setShowBracketHighlight( boolean b ) {
      showBracketHighlight = b;
   }

   public Color getEolMarkerColor() {
      return eolMarkerColor;
   }

   public void setEolMarkerColor( Color c ) {
      eolMarkerColor = c;
   }

   public boolean showEolMarker() {
      return showEolMarker;
   }

   public void setShowEolMarker( boolean b ) {
      showEolMarker = b;
   }

   /**
    * load default settings from preferences
    */
   public void load() {
      caretBlinks = PREFS.getBoolean( CARET_BLINKS, true );
      caretColor = new Color( PREFS.getInt( CARET_COLOR, 0 ) );

      electricScroll = PREFS.getInt( ELECTRIC_SCROLL_HEIGHT, 3 );
      useSmartHome = PREFS.getBoolean( SMART_HOME, false );
      tabSize = PREFS.getInt( TAB_SIZE, 4 );

      selectionColor = new Color( PREFS.getInt( SELECTION_COLOR, 0xccccff ) );

      lineHighlightColor = new Color( PREFS.getInt( LINE_HILITE_COLOR, 0xe0e0e0 ) );
      showLineHighlight = PREFS.getBoolean( SHOW_LINE_HILITE, true );

      bracketHighlightColor = new Color( PREFS.getInt( BRACKET_HILITE_COLOR, 0 ) );
      showBracketHighlight = PREFS.getBoolean( SHOW_BRACKET_HILITE, false );

      eolMarkerColor = new Color( PREFS.getInt( EOL_MARKER_COLOR, 0x009999 ) );
      showEolMarker = PREFS.getBoolean( SHOW_EOL_MARKER, false );
   }

   /**
    * save default settings to preferences
    */
   public void save() {
      PREFS.putBoolean( CARET_BLINKS, getCaretBlinks() );
      PREFS.putInt( CARET_COLOR, getCaretColor().getRGB() );

      PREFS.putInt( ELECTRIC_SCROLL_HEIGHT, getElectricScroll() );
      PREFS.putBoolean( SMART_HOME, useSmartHome() );
      PREFS.putInt( TAB_SIZE, tabSize );

      PREFS.putInt( SELECTION_COLOR, getSelectionColor().getRGB() );

      PREFS.putInt( LINE_HILITE_COLOR, getLineHighlightColo​r().getRGB() );
      PREFS.putBoolean( SHOW_LINE_HILITE, showLineHighlight() );

      PREFS.putInt( BRACKET_HILITE_COLOR, getBracketHighlightC​olor().getRGB() );
      PREFS.putBoolean( SHOW_BRACKET_HILITE, showBracketHighlight() );

      PREFS.putInt( EOL_MARKER_COLOR, getEolMarkerColor().getRGB() );
      PREFS.putBoolean( SHOW_EOL_MARKER, showEolMarker() );
   }

   /**
    * Apply the current settings to the give editor.
    */
   public void apply( JEditTextArea editor ) {
      TextAreaPainter tap = editor.getPainter();
      tap.setCaretColor( getCaretColor() );
      editor.setElectricScroll( getElectricScroll() );
      editor.getDocument()​.putProperty( javax.swing.text.Pla​inDocument.tabSizeAt​tribute, new Integer( tabSize ) );
      editor.putClientProperty( InputHandler.SMART_H​OME_END_PROPERTY, new Boolean( useSmartHome() ) );
      tap.setSelectionColor( getSelectionColor() );
      tap.setLineHighlightColor( getLineHighlightColor() );
      tap.setLineHighlightEnabled( showLineHighlight() );
      tap.setBracketHighlightEnabled( showBracketHighlight() );
      tap.setBracketHighlightColor( getBracketHighlightColor() );
      tap.setEOLMarkersPainted( showEolMarker() );
      tap.setEOLMarkerColor( getEolMarkerColor() );
   }
}

File [added]: StyleEditor.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/StyleEdit​or.java?rev=1.1&​content-type=text/vn​d.viewcvs-markup
Added lines: 148
----------------
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Ant", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache at apache dot org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================​====================​====================​========
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package ise.antelope.app;

import ise.antelope.common.Constants;
import ise.antelope.app.jed​it.SyntaxStyle;

import ise.library.KappaLayout;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.EmptyBorder;

/**
 * Allows the user to select a style for a particular syntax type.
 * @author Dale Anson, Dec 2002
 */
public class StyleEditor extends JDialog implements Constants {

    private JCheckBox italic_cb;
    private JCheckBox bold_cb;
    private JButton text_color_btn;
    private JButton ok_btn;
    private JButton cancel_btn;
    private SyntaxStyle style = null;

    public StyleEditor( JDialog parent, SyntaxStyle ss ) {
        super( parent );
        setModal( true );
        setResizable( false );
        setTitle( "Set Style" );

        JPanel pane = new JPanel();
        pane.setLayout( new KappaLayout() );
        setContentPane( pane );
        pane.setBorder( new EmptyBorder( 6, 6, 6, 6 ) );

        italic_cb = new JCheckBox( "Italic" );
        italic_cb.setSelected( ss.isItalic() );
        bold_cb = new JCheckBox( "Bold" );
        bold_cb.setSelected( ss.isBold() );
        JLabel label = new JLabel( "Text color:" );
        text_color_btn = new JButton();
        text_color_btn.setBackground( ss.getColor() );
        ok_btn = new JButton( "OK" );
        cancel_btn = new JButton( "Cancel" );

        pane.add( italic_cb, "0, 0, 3, 1, W, , 3" );
        pane.add( bold_cb, "0, 1, 3, 1, W, , 3" );
        pane.add( label, "0, 2, 2, 1, W, , 3" );
        pane.add( text_color_btn, "2, 2, 1, 1, 0, wh, 3" );
        pane.add( KappaLayout.createVe​rticalStrut( 11 ), "0, 3" );

        KappaLayout layout = new KappaLayout();
        JPanel btn_panel = new JPanel( layout );
        btn_panel.add( ok_btn, "0, 0, 1, 1, 0, wh, 3" );
        btn_panel.add( cancel_btn, "1, 0, 1, 1, 0, wh, 3" );
        layout.makeColumnsSameWidth( 0, 1 );
        pane.add( btn_panel, "0, 4, 3, 1, 0, , 6" );

        text_color_btn.addAc​tionListener( new ActionListener() {
                    public void actionPerformed( ActionEvent ae ) {
                        Color color = JColorChooser.showDialog( StyleEditor.this,
                                "Pick Color", text_color_btn.getBackground() );
                        if (color != null)
                            text_color_btn.setBackground( color );
                    }
                }
                                        );

        ok_btn.addActionListener( new ActionListener() {
                    public void actionPerformed( ActionEvent ae ) {
                        style = new SyntaxStyle( text_color_btn.getBackground(),
                                italic_cb.isSelected(),
                                bold_cb.isSelected() );
                        setVisible( false );
                    }
                }
                                );

        cancel_btn.addActionListener( new ActionListener() {
                    public void actionPerformed( ActionEvent ae ) {
                        style = null;
                        setVisible( false );
                    }
                }
                                    );
        pack();
        Rectangle pb = parent.getBounds();
        setLocation( pb.x + pb.width, pb.y );
        setVisible( true );
    }

    public SyntaxStyle getStyle() {
        return style;
    }
}

File [added]: SyntaxChooser.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/SyntaxCho​oser.java?rev=1.1​&content-type=text/​vnd.viewcvs-markup
Added lines: 231
----------------
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Ant", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache at apache dot org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================​====================​====================​========
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package ise.antelope.app;

import ise.antelope.common.Constants;
import ise.antelope.app.jedit.*;
import ise.library.GUIUtils;
import ise.library.KappaLayout;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.EmptyBorder;

/**
 * Allows the user to select a style for a particular syntax type.
 * @author Dale Anson, Dec 2002
 */
public class SyntaxChooser extends JDialog implements Constants {

    private JButton ok_btn;
    private StyleButton comment1_disp = null;
    private StyleButton comment2_disp = null;
    private StyleButton keyword1_disp = null;
    private StyleButton keyword2_disp = null;
    private StyleButton keyword3_disp = null;
    private StyleButton literal1_disp = null;
    private StyleButton literal2_disp = null;
    private StyleButton label_disp = null;
    private StyleButton operator_disp = null;
    private StyleButton invalid_disp = null;
    private SyntaxStyle[] styles = null;

    private SyntaxChooser( JFrame parent ) {
        super( parent );
        setModal( true );
        setResizable( false );
        setTitle( "Syntax Highlighting" );

        JLabel comment1_lbl = new JLabel( "Comment 1" );
        JLabel comment2_lbl = new JLabel( "Comment 2" );
        JLabel keyword1_lbl = new JLabel( "Tag name" );
        JLabel keyword2_lbl = new JLabel( "Attribute" );
        JLabel keyword3_lbl = new JLabel( "Inside PI" );
        JLabel literal1_lbl = new JLabel( "String" );
        JLabel literal2_lbl = new JLabel( "String" );
        JLabel label_lbl = new JLabel( "Entity" );
        JLabel operator_lbl = new JLabel( "Operator" );
        JLabel invalid_lbl = new JLabel( "Invalid" );

        SyntaxStyle[] ss = AntelopeSyntaxUtilit​ies.getStoredStyles(​);
        comment1_disp = new StyleButton( "comment", ss[ Token.COMMENT1 ] );
        comment2_disp = new StyleButton( "comment", ss[ Token.COMMENT2 ] );
        keyword1_disp = new StyleButton( "target ", ss[ Token.KEYWORD1 ] );
        keyword2_disp = new StyleButton( "name", ss[ Token.KEYWORD2 ] );
        keyword3_disp = new StyleButton( "some text", ss[ Token.KEYWORD3 ] );
        literal1_disp = new StyleButton( "\"some text\"", ss[ Token.LITERAL1 ] );
        literal2_disp = new StyleButton( "'some text'", ss[ Token.LITERAL2 ] );
        label_disp = new StyleButton( "&amp;", ss[ Token.LABEL ] );
        operator_disp = new StyleButton( "=", ss[ Token.OPERATOR ] );
        invalid_disp = new StyleButton( "invalid", ss[ Token.INVALID ] );

        ActionListener al = new ActionListener() {
                    public void actionPerformed( ActionEvent ae ) {
                        StyleButton btn = ( StyleButton ) ae.getSource();
                        StyleEditor se = new StyleEditor( SyntaxChooser.this, btn.getStyle() );
                        SyntaxStyle ss = se.getStyle();
                        if ( ss != null ){
                            btn.setStyle( ss );
                        }
                    }
                };

        comment1_disp.addAct​ionListener(al);
        comment2_disp.addAct​ionListener(al);
        keyword1_disp.addAct​ionListener(al);
        keyword2_disp.addAct​ionListener(al);
        keyword3_disp.addAct​ionListener(al);
        literal1_disp.addAct​ionListener(al);
        literal2_disp.addAct​ionListener(al);
        label_disp.addAction​Listener(al);
        operator_disp.addAct​ionListener(al);
        invalid_disp.addActi​onListener(al);

        KappaLayout layout = new KappaLayout();
        JPanel pane = new JPanel( layout );
        setContentPane( pane );
        pane.setBorder( new EmptyBorder( 6, 6, 6, 6 ) );

        pane.add( comment1_lbl, "0, 0, 1, 1, W, wh, 0" );
        pane.add( comment2_lbl, "0, 1, 1, 1, W, wh, 0" );
        pane.add( keyword1_lbl, "0, 2, 1, 1, W, wh, 0" );
        pane.add( keyword2_lbl, "0, 3, 1, 1, W, wh, 0" );
        pane.add( keyword3_lbl, "0, 4, 1, 1, W, wh, 0" );
        pane.add( literal1_lbl, "0, 5, 1, 1, W, wh, 0" );
        pane.add( literal2_lbl, "0, 6, 1, 1, W, wh, 0" );
        pane.add( label_lbl, "0, 7, 1, 1, W, wh, 0" );
        pane.add( operator_lbl, "0, 8, 1, 1, W, wh, 0" );
        pane.add( invalid_lbl, "0, 9, 1, 1, W, wh, 0" );
        pane.add( comment1_disp, "1, 0, 1, 1, W, wh, 0" );
        pane.add( comment2_disp, "1, 1, 1, 1, W, wh, 0" );
        pane.add( keyword1_disp, "1, 2, 1, 1, W, wh, 0" );
        pane.add( keyword2_disp, "1, 3, 1, 1, W, wh, 0" );
        pane.add( keyword3_disp, "1, 4, 1, 1, W, wh, 0" );
        pane.add( literal1_disp, "1, 5, 1, 1, W, wh, 0" );
        pane.add( literal2_disp, "1, 6, 1, 1, W, wh, 0" );
        pane.add( label_disp, "1, 7, 1, 1, W, wh, 0" );
        pane.add( operator_disp, "1, 8, 1, 1, W, wh, 0" );
        pane.add( invalid_disp, "1, 9, 1, 1, W, wh, 0" );

        layout.makeColumnsSameWidth( 0, 1 );

        layout = new KappaLayout();
        JPanel btn_panel = new JPanel( layout );
        ok_btn = new JButton( "OK" );
        JButton cancel_btn = new JButton( "Cancel" );
        btn_panel.add( ok_btn, "0, 0, 1, 1, 0, wh, 3" );
        btn_panel.add( cancel_btn, "1, 0, 1, 1, 0, wh, 3" );
        layout.makeColumnsSameWidth( 0, 1 );
        pane.add( btn_panel, "0, 10, 2, 1, 0, , 6" );

        ok_btn.addActionListener( new ActionListener() {
                    public void actionPerformed( ActionEvent ae ) {
                        styles = AntelopeSyntaxUtilit​ies.getStoredStyles(​);
                        styles[ Token.COMMENT1 ] = comment1_disp.getStyle();
                        styles[ Token.COMMENT2 ] = comment2_disp.getStyle();
                        styles[ Token.KEYWORD1 ] = keyword1_disp.getStyle();
                        styles[ Token.KEYWORD2 ] = keyword2_disp.getStyle();
                        styles[ Token.KEYWORD3 ] = keyword3_disp.getStyle();
                        styles[ Token.LITERAL1 ] = literal1_disp.getStyle();
                        styles[ Token.LITERAL2 ] = literal2_disp.getStyle();
                        styles[ Token.LABEL ] = label_disp .getStyle();
                        styles[ Token.OPERATOR ] = operator_disp.getStyle();
                        styles[ Token.INVALID ] = invalid_disp .getStyle();
                        AntelopeSyntaxUtilit​ies.storeStyles( styles );
                        setVisible( false );
                        dispose();
                    }
                }
                                );
        cancel_btn.addActionListener( new ActionListener() {
                    public void actionPerformed( ActionEvent ae ) {
                        styles = null;
                        setVisible( false );
                        dispose();
                    }
                }
                                    );

        pack();
        GUIUtils.center( parent, this );
        setVisible( true );
    }

    public SyntaxStyle[] getStyles() {
        return styles;
    }

    public static SyntaxChooser showDialog( JFrame parent ) {
        SyntaxChooser c = new SyntaxChooser( parent );
        return c;
    }

    public class StyleButton extends JButton {
        private SyntaxStyle style = null;
        public StyleButton( String title, SyntaxStyle ss ) {
            super( title );
            setStyle( ss );
        }
        public void setStyle( SyntaxStyle ss ) {
            style = ss;
            this.setForeground(s​s.getColor());
            this.setBackground(C​olor.white);
            this.setFont( ss.getStyledFont( this.getFont() ) );
        }
        public SyntaxStyle getStyle() {
            return style;
        }
    }
}

Directory: /antelope/src/ise/an​telope/app/jedit/
====================​====================​========

File [added]: DefaultInputHandler.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/Def​aultInputHandler.jav​a?rev=1.1&conten​t-type=text/vnd.view​cvs-markup
Added lines: 0
--------------

File [added]: FindAndReplace.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/Fin​dAndReplace.java?rev​=1.1&content-typ​e=text/vnd.viewcvs-m​arkup
Added lines: 0
--------------

File [added]: InputHandler.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/Inp​utHandler.java?rev=1​.1&content-type=​text/vnd.viewcvs-mar​kup
Added lines: 0
--------------

File [added]: JEditTextArea.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/JEd​itTextArea.java?rev=​1.1&content-type​=text/vnd.viewcvs-ma​rkup
Added lines: 0
--------------

File [added]: KeywordMap.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/Key​wordMap.java?rev=1.1​&content-type=te​xt/vnd.viewcvs-marku​p
Added lines: 0
--------------

File [added]: SyntaxDocument.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/Syn​taxDocument.java?rev​=1.1&content-typ​e=text/vnd.viewcvs-m​arkup
Added lines: 0
--------------

File [added]: SyntaxStyle.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/Syn​taxStyle.java?rev=1.​1&content-type=t​ext/vnd.viewcvs-mark​up
Added lines: 0
--------------

File [added]: SyntaxUtilities.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/Syn​taxUtilities.java?re​v=1.1&content-ty​pe=text/vnd.viewcvs-​markup
Added lines: 0
--------------

File [added]: TextAreaDefaults.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/Tex​tAreaDefaults.java?r​ev=1.1&content-t​ype=text/vnd.viewcvs​-markup
Added lines: 84
---------------
/*
 * TextAreaDefaults.java - Encapsulates default values for various settings
 * Copyright (C) 1999 Slava Pestov
 *
 * You may use and modify this package for any purpose. Redistribution is
 * permitted, in both source and binary form, provided that this notice
 * remains intact in all source distributions of this package.
 */

package ise.antelope.app.jedit;

import javax.swing.JPopupMenu;
import java.awt.Color;

/**
 * Encapsulates default settings for a text area. This can be passed
 * to the constructor once the necessary fields have been filled out.
 * The advantage of doing this over calling lots of set() methods after
 * creating the text area is that this method is faster.
 */
public class TextAreaDefaults
{
    private static TextAreaDefaults DEFAULTS;

    public InputHandler inputHandler;
    public SyntaxDocument document;
    public boolean editable;

    public boolean caretVisible;
    public boolean caretBlinks;
    public boolean blockCaret;
    public int electricScroll;

    public int cols;
    public int rows;
    public SyntaxStyle[] styles;
    public Color caretColor;
    public Color selectionColor;
    public Color lineHighlightColor;
    public boolean lineHighlight;
    public Color bracketHighlightColor;
    public boolean bracketHighlight;
    public Color eolMarkerColor;
    public boolean eolMarkers;
    public boolean paintInvalid;

    public JPopupMenu popup;

    /**
     * Returns a new TextAreaDefaults object with the default values filled
     * in.
     */
    public static TextAreaDefaults getDefaults()
    {
        if(DEFAULTS == null)
        {
            DEFAULTS = new TextAreaDefaults();

            DEFAULTS.inputHandler = new DefaultInputHandler();
            DEFAULTS.inputHandle​r.addDefaultKeyBindi​ngs();
            DEFAULTS.document = new SyntaxDocument();
            DEFAULTS.editable = true;

            DEFAULTS.caretVisible = true;
            DEFAULTS.caretBlinks = true;
            DEFAULTS.electricScroll = 3;

            DEFAULTS.cols = 80;
            DEFAULTS.rows = 25;
            DEFAULTS.styles = SyntaxUtilities.getD​efaultSyntaxStyles()​;
            DEFAULTS.caretColor = Color.red;
            DEFAULTS.selectionColor = new Color(0xccccff);
            DEFAULTS.lineHighlightColor = new Color(0xe0e0e0);
            DEFAULTS.lineHighlight = true;
            DEFAULTS.bracketHighlightColor = Color.black;
            DEFAULTS.bracketHighlight = true;
            DEFAULTS.eolMarkerColor = new Color(0x009999);
            DEFAULTS.eolMarkers = true;
            DEFAULTS.paintInvalid = true;
        }

        return DEFAULTS;
    }
}

File [added]: TextAreaPainter.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/Tex​tAreaPainter.java?re​v=1.1&content-ty​pe=text/vnd.viewcvs-​markup
Added lines: 0
--------------

File [added]: TextUtilities.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/Tex​tUtilities.java?rev=​1.1&content-type​=text/vnd.viewcvs-ma​rkup
Added lines: 0
--------------

File [added]: Token.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/Tok​en.java?rev=1.1&​content-type=text/vn​d.viewcvs-markup
Added lines: 0
--------------

File [added]: TokenMarker.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/Tok​enMarker.java?rev=1.​1&content-type=t​ext/vnd.viewcvs-mark​up
Added lines: 0
--------------

File [added]: XMLTokenMarker.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/app/jedit/XML​TokenMarker.java?rev​=1.1&content-typ​e=text/vnd.viewcvs-m​arkup
Added lines: 0
--------------




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@ante​lope.tigris.org
For additional commands, e-mail: cvs-help at antelope dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /antelope/src/ise/antelope/app/, /antelope/src/ise/antelope/app/jedit/ danson Dale Anson 2004-02-15 18:39:43 PST
Messages per page: