亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? syntaxhiliteoptionpane.java

?? 用java 編寫的源碼開放的文本編輯器。有很多有用的特性
?? JAVA
字號:
/* * SyntaxHiliteOptionPane.java - Syntax highlighting option pane * :tabSize=8:indentSize=8:noTabs=false: * :folding=explicit:collapseFolds=1: * * Copyright (C) 1999, 2000, 2001 Slava Pestov * Portions copyright (C) 1999 mike dillon * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */package org.gjt.sp.jedit.options;//{{{ Importsimport javax.swing.border.EmptyBorder;import javax.swing.table.*;import javax.swing.*;import java.awt.event.*;import java.awt.*;import java.util.Vector;import org.gjt.sp.jedit.syntax.SyntaxStyle;import org.gjt.sp.jedit.gui.ColorWellButton;import org.gjt.sp.jedit.gui.EnhancedDialog;import org.gjt.sp.jedit.*;//}}}//{{{ SyntaxHiliteOptionPane class/** * Style option pane. * @author Slava Pestov * @version $Id: SyntaxHiliteOptionPane.java,v 1.4 2003/01/12 03:08:24 spestov Exp $ */public class SyntaxHiliteOptionPane extends AbstractOptionPane{	public static final EmptyBorder noFocusBorder = new EmptyBorder(1,1,1,1);	//{{{ StyleOptionPane constructor	public SyntaxHiliteOptionPane()	{		super("syntax");	}	//}}}	//{{{ Protected members	//{{{ _init() method	protected void _init()	{		setLayout(new BorderLayout(6,6));		add(BorderLayout.CENTER,createStyleTableScroller());	} //}}}	//{{{ _save() method	protected void _save()	{		styleModel.save();	} //}}}	//}}}	//{{{ Private members	private StyleTableModel styleModel;	private JTable styleTable;	//{{{ createStyleTableScroller() method	private JScrollPane createStyleTableScroller()	{		styleModel = createStyleTableModel();		styleTable = new JTable(styleModel);		styleTable.setRowSelectionAllowed(false);		styleTable.setColumnSelectionAllowed(false);		styleTable.setCellSelectionEnabled(false);		styleTable.getTableHeader().setReorderingAllowed(false);		styleTable.addMouseListener(new MouseHandler());		TableColumnModel tcm = styleTable.getColumnModel(); 		TableColumn styleColumn = tcm.getColumn(1);		styleColumn.setCellRenderer(new StyleTableModel.StyleRenderer());		Dimension d = styleTable.getPreferredSize();		d.height = Math.min(d.height,100);		JScrollPane scroller = new JScrollPane(styleTable);		scroller.setPreferredSize(d);		return scroller;	} //}}}	//{{{ createStyleTableModel() method	private StyleTableModel createStyleTableModel()	{		return new StyleTableModel();	} //}}}	//}}}	//{{{ MouseHandler class	class MouseHandler extends MouseAdapter	{		public void mouseClicked(MouseEvent evt)		{			int row = styleTable.rowAtPoint(evt.getPoint());			if(row == -1)				return;			SyntaxStyle style = new StyleEditor(				SyntaxHiliteOptionPane.this,				(SyntaxStyle)styleModel.getValueAt(				row,1)).getStyle();			if(style != null)				styleModel.setValueAt(style,row,1);		}	} //}}}} //}}}//{{{ StyleTableModel classclass StyleTableModel extends AbstractTableModel{	private Vector styleChoices;	//{{{ StyleTableModel constructor	StyleTableModel()	{		styleChoices = new Vector(13);		addStyleChoice("options.syntax.comment1Style","view.style.comment1");		addStyleChoice("options.syntax.comment2Style","view.style.comment2");		addStyleChoice("options.syntax.literal1Style","view.style.literal1");		addStyleChoice("options.syntax.literal2Style","view.style.literal2");		addStyleChoice("options.syntax.labelStyle","view.style.label");		addStyleChoice("options.syntax.keyword1Style","view.style.keyword1");		addStyleChoice("options.syntax.keyword2Style","view.style.keyword2");		addStyleChoice("options.syntax.keyword3Style","view.style.keyword3");		addStyleChoice("options.syntax.functionStyle","view.style.function");		addStyleChoice("options.syntax.markupStyle","view.style.markup");		addStyleChoice("options.syntax.operatorStyle","view.style.operator");		addStyleChoice("options.syntax.digitStyle","view.style.digit");		addStyleChoice("options.syntax.invalidStyle","view.style.invalid");		addStyleChoice("options.syntax.foldLine","view.style.foldLine");		MiscUtilities.quicksort(styleChoices,new MiscUtilities.StringCompare());	} //}}}	//{{{ getColumnCount() method	public int getColumnCount()	{		return 2;	} //}}}	//{{{ getRowCount() method	public int getRowCount()	{		return styleChoices.size();	} //}}}	//{{{ getValueAt() method	public Object getValueAt(int row, int col)	{		StyleChoice ch = (StyleChoice)styleChoices.elementAt(row);		switch(col)		{		case 0:			return ch.label;		case 1:			return ch.style;		default:			return null;		}	} //}}}	//{{{ setValueAt() method	public void setValueAt(Object value, int row, int col)	{		StyleChoice ch = (StyleChoice)styleChoices.elementAt(row);		if(col == 1)			ch.style = (SyntaxStyle)value;		fireTableRowsUpdated(row,row);	} //}}}	//{{{ getColumnName() method	public String getColumnName(int index)	{		switch(index)		{		case 0:			return jEdit.getProperty("options.syntax.object");		case 1:			return jEdit.getProperty("options.syntax.style");		default:			return null;		}	} //}}}	//{{{ save() method	public void save()	{		for(int i = 0; i < styleChoices.size(); i++)		{			StyleChoice ch = (StyleChoice)styleChoices				.elementAt(i);			jEdit.setProperty(ch.property,				GUIUtilities.getStyleString(ch.style));		}	} //}}}	//{{{ addStyleChoice() method	private void addStyleChoice(String label, String property)	{		styleChoices.addElement(new StyleChoice(jEdit.getProperty(label),			property,			GUIUtilities.parseStyle(jEdit.getProperty(property),			"Dialog",12)));	} //}}}	//{{{ StyleChoice class	static class StyleChoice	{		String label;		String property;		SyntaxStyle style;		StyleChoice(String label, String property, SyntaxStyle style)		{			this.label = label;			this.property = property;			this.style = style;		}		// for sorting		public String toString()		{			return label;		}	} //}}}	//{{{ StyleRenderer class	static class StyleRenderer extends JLabel		implements TableCellRenderer	{		//{{{ StyleRenderer constructor		public StyleRenderer()		{			setOpaque(true);			setBorder(SyntaxHiliteOptionPane.noFocusBorder);			setText("Hello World");		} //}}}		//{{{ getTableCellRendererComponent() method		public Component getTableCellRendererComponent(			JTable table,			Object value,			boolean isSelected,			boolean cellHasFocus,			int row,			int col)		{			if (value != null)			{				SyntaxStyle style = (SyntaxStyle)value;				setForeground(style.getForegroundColor());				if (style.getBackgroundColor() != null) 					setBackground(style.getBackgroundColor());				else				{					// this part sucks					setBackground(jEdit.getColorProperty(						"view.bgColor"));				}				setFont(style.getFont());			}			setBorder((cellHasFocus) ? UIManager.getBorder(				"Table.focusCellHighlightBorder")				: SyntaxHiliteOptionPane.noFocusBorder);			return this;		} //}}}	} //}}}} //}}}//{{{ StyleEditor classclass StyleEditor extends EnhancedDialog implements ActionListener{	//{{{ StyleEditor constructor	StyleEditor(Component comp, SyntaxStyle style)	{		super(GUIUtilities.getParentDialog(comp),			jEdit.getProperty("style-editor.title"),true);		JPanel content = new JPanel(new BorderLayout(12,12));		content.setBorder(new EmptyBorder(12,12,12,12));		setContentPane(content);		GridBagLayout layout = new GridBagLayout();		JPanel panel = new JPanel(layout);		GridBagConstraints cons = new GridBagConstraints();		cons.gridx = cons.gridy = 0;		cons.gridwidth = 2;		cons.gridheight = 1;		cons.fill = GridBagConstraints.BOTH;		cons.weightx = 0.0f;		italics = new JCheckBox(jEdit.getProperty("style-editor.italics"));		italics.setSelected(style.getFont().isItalic());		layout.setConstraints(italics,cons);		panel.add(italics);		cons.gridy++;		bold = new JCheckBox(jEdit.getProperty("style-editor.bold"));		bold.setSelected(style.getFont().isBold());		layout.setConstraints(bold,cons);		panel.add(bold);		cons.gridy++;		cons.gridwidth = 1;		Color fg = style.getForegroundColor();		fgColorCheckBox = new JCheckBox(jEdit.getProperty("style-editor.fgColor"));		fgColorCheckBox.setSelected(fg != null);		fgColorCheckBox.addActionListener(this);		fgColorCheckBox.setBorder(new EmptyBorder(0,0,0,12));		layout.setConstraints(fgColorCheckBox,cons);		panel.add(fgColorCheckBox);		cons.gridx++;		fgColor = new ColorWellButton(fg);		fgColor.setEnabled(fg != null);		layout.setConstraints(fgColor,cons);		panel.add(fgColor);		cons.gridx = 0;		cons.gridy++;		Color bg = style.getBackgroundColor();		bgColorCheckBox = new JCheckBox(jEdit.getProperty("style-editor.bgColor"));		bgColorCheckBox.setSelected(bg != null);		bgColorCheckBox.addActionListener(this);		bgColorCheckBox.setBorder(new EmptyBorder(0,0,0,12));		layout.setConstraints(bgColorCheckBox,cons);		panel.add(bgColorCheckBox);		cons.gridx++;		bgColor = new ColorWellButton(bg);		bgColor.setEnabled(bg != null);		layout.setConstraints(bgColor,cons);		panel.add(bgColor);		content.add(BorderLayout.CENTER,panel);		Box box = new Box(BoxLayout.X_AXIS);		box.add(Box.createGlue());		box.add(ok = new JButton(jEdit.getProperty("common.ok")));		getRootPane().setDefaultButton(ok);		ok.addActionListener(this);		box.add(Box.createHorizontalStrut(6));		box.add(cancel = new JButton(jEdit.getProperty("common.cancel")));		cancel.addActionListener(this);		box.add(Box.createGlue());		content.add(BorderLayout.SOUTH,box);		pack();		setLocationRelativeTo(GUIUtilities.getParentDialog(comp));		setResizable(false);		show();	} //}}}	//{{{ actionPerformed() method	public void actionPerformed(ActionEvent evt)	{		Object source = evt.getSource();		if(source == ok)			ok();		else if(source == cancel)			cancel();		else if(source == fgColorCheckBox)			fgColor.setEnabled(fgColorCheckBox.isSelected());		else if(source == bgColorCheckBox)			bgColor.setEnabled(bgColorCheckBox.isSelected());	} //}}}	//{{{ ok() method	public void ok()	{		okClicked = true;		dispose();	} //}}}	//{{{ cancel() method	public void cancel()	{		dispose();	} //}}}	//{{{ getStyle() method	public SyntaxStyle getStyle()	{		if(!okClicked)			return null;		Color foreground = (fgColorCheckBox.isSelected()			? fgColor.getSelectedColor()			: null);		Color background = (bgColorCheckBox.isSelected()			? bgColor.getSelectedColor()			: null);		return new SyntaxStyle(foreground,background,				new Font("Dialog",				(italics.isSelected() ? Font.ITALIC : 0)				| (bold.isSelected() ? Font.BOLD : 0),				12));	} //}}}	//{{{ Private members	private JCheckBox italics;	private JCheckBox bold;	private JCheckBox fgColorCheckBox;	private ColorWellButton fgColor;	private JCheckBox bgColorCheckBox;	private ColorWellButton bgColor;	private JButton ok;	private JButton cancel;	private boolean okClicked;	//}}}} //}}}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费在线观看入口| 精品三级在线观看| 亚洲精品午夜久久久| 色香蕉久久蜜桃| 一区二区三区中文字幕| 欧美性色黄大片| 丝袜a∨在线一区二区三区不卡| 制服丝袜亚洲播放| 人人精品人人爱| 久久精品夜色噜噜亚洲a∨| 丰满亚洲少妇av| 一区二区激情小说| 欧美不卡视频一区| 国产成人在线视频网站| 国产精品久久久久久久久图文区| 色综合久久中文综合久久97| 亚洲午夜免费电影| 精品少妇一区二区三区在线视频| 国产伦精品一区二区三区在线观看 | 日韩一区二区三区在线观看| 久久超碰97中文字幕| 国产精品免费视频观看| 欧美性大战久久久久久久蜜臀 | 美国毛片一区二区三区| 久久久久久**毛片大全| 一本在线高清不卡dvd| 日韩av网站在线观看| 国产嫩草影院久久久久| 欧美三级视频在线观看| 国产乱码字幕精品高清av| 亚洲精品ww久久久久久p站| 久久亚洲综合色一区二区三区| 丁香激情综合国产| 亚洲国产另类av| 国产精品视频一二三区| 91精品国产高清一区二区三区蜜臀 | 亚洲精品你懂的| 精品欧美久久久| 日本久久一区二区三区| 激情av综合网| 亚洲国产日产av| 中文一区在线播放| 日韩精品综合一本久道在线视频| 色哟哟一区二区| 国产成人aaa| 久久精品二区亚洲w码| 亚洲激情欧美激情| 国产精品色在线观看| 日韩精品一区国产麻豆| 欧美丝袜丝nylons| 99久久伊人精品| 国产.欧美.日韩| 蜜桃视频一区二区| 日韩电影在线观看电影| 亚洲在线中文字幕| 亚洲视频一区二区在线观看| 国产日韩欧美精品电影三级在线| 91精品麻豆日日躁夜夜躁| 在线观看亚洲成人| 色天天综合色天天久久| av日韩在线网站| 国产精品66部| 久久疯狂做爰流白浆xx| 亚洲成人自拍网| 亚洲国产乱码最新视频| 一区二区三区在线视频免费| 国产精品成人午夜| 国产欧美一区二区在线观看| 久久色成人在线| 2021中文字幕一区亚洲| 欧美v亚洲v综合ⅴ国产v| 日韩欧美在线123| 欧美一区二区黄色| 欧美一级在线观看| 日韩欧美国产综合一区 | 99re66热这里只有精品3直播 | 风流少妇一区二区| 成人自拍视频在线| 成人深夜在线观看| 粉嫩蜜臀av国产精品网站| 成人晚上爱看视频| 99久久伊人精品| 91九色最新地址| 欧美怡红院视频| 欧美高清精品3d| 欧美一二三区在线观看| 2024国产精品视频| 国产日韩欧美精品综合| 综合分类小说区另类春色亚洲小说欧美| 国产日韩高清在线| 国产精品理伦片| 一区二区三区在线观看网站| 午夜精品福利视频网站| 奇米在线7777在线精品| 狠狠久久亚洲欧美| www.亚洲精品| 在线观看亚洲一区| 欧美一级夜夜爽| 久久只精品国产| 亚洲欧洲国产日韩| 亚洲国产一区二区三区青草影视| 日韩有码一区二区三区| 久久国产精品无码网站| 国产成人综合亚洲网站| 色成年激情久久综合| 日韩一级精品视频在线观看| 久久久九九九九| 亚洲在线中文字幕| 奇米四色…亚洲| 国产精品一区二区无线| 不卡一区二区中文字幕| 欧美日韩大陆一区二区| 久久综合九色欧美综合狠狠| 亚洲欧洲三级电影| 午夜国产精品一区| 国产主播一区二区三区| 一本大道久久a久久精二百| 91精品综合久久久久久| 国产午夜精品一区二区三区四区| 亚洲激情欧美激情| 国产一区二区福利| 欧美影院一区二区三区| 久久久久久久综合日本| 亚洲18影院在线观看| 国产精选一区二区三区| 欧美日韩亚洲丝袜制服| 欧美高清在线一区二区| 男人的天堂亚洲一区| 91麻豆免费观看| 久久久综合网站| 亚洲成av人片一区二区梦乃| 国产成a人亚洲精| 日韩一区二区视频在线观看| 亚洲人成7777| 国产一区二区三区四区在线观看| 色88888久久久久久影院按摩| 久久久99久久精品欧美| 日韩电影免费在线| 91亚洲精华国产精华精华液| 久久久亚洲欧洲日产国码αv| 午夜电影一区二区| 日本久久电影网| 中文字幕乱码亚洲精品一区| 精品中文字幕一区二区| 7777女厕盗摄久久久| 一区二区高清免费观看影视大全 | 亚洲影院久久精品| 成人免费av网站| 久久蜜桃av一区二区天堂| 日本91福利区| 欧美一区二区三区四区久久| 一级特黄大欧美久久久| 91在线你懂得| 亚洲图片激情小说| av亚洲精华国产精华| 国产女主播在线一区二区| 国内成人精品2018免费看| 欧美另类久久久品| 亚瑟在线精品视频| 欧美在线观看禁18| 亚洲风情在线资源站| 在线观看不卡视频| 亚洲一区影音先锋| 欧美亚洲丝袜传媒另类| 亚洲国产日日夜夜| 欧美日韩亚洲综合一区| 午夜视频在线观看一区二区| 欧美日韩国产综合一区二区三区| 亚洲一区二区三区视频在线播放| 色婷婷av一区二区三区之一色屋| 亚洲人吸女人奶水| 91福利在线免费观看| 一区二区三区中文在线观看| 91福利在线播放| 午夜电影一区二区三区| 欧美一区二区在线免费播放| 久久国产日韩欧美精品| 久久久精品免费观看| 国产黄色精品网站| 自拍偷拍欧美激情| 欧美亚洲丝袜传媒另类| 天天影视色香欲综合网老头| 91精品国产综合久久香蕉的特点 | 国产亚洲成av人在线观看导航| 激情伊人五月天久久综合| 久久久综合激的五月天| 成人午夜电影小说| 一区二区三区欧美日韩| 欧美人妖巨大在线| 国产在线视频一区二区| 欧美激情在线免费观看| 94-欧美-setu| 午夜电影久久久| 久久在线观看免费| 91视频在线观看免费| 偷窥少妇高潮呻吟av久久免费| 精品成a人在线观看| 91猫先生在线| 久久精品久久久精品美女| 国产精品嫩草影院av蜜臀|