update MeteoInfoMap script form
3
.idea/compiler.xml
generated
@ -9,10 +9,13 @@
|
||||
<module name="MeteoInfoLab" />
|
||||
<module name="MeteoInfoLib" />
|
||||
<module name="MeteoInfoMap" />
|
||||
<module name="meteoinfo-console" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="MeteoInfo" target="1.8" />
|
||||
<module name="meteoinfo-console" target="1.8" />
|
||||
<module name="meteoinfo-numeric" target="1.8" />
|
||||
<module name="MeteoInfoLab" target="1.8" />
|
||||
<module name="MeteoInfoLib" target="1.8" />
|
||||
<module name="MeteoInfoMap" target="1.8" />
|
||||
|
||||
2
.idea/encodings.xml
generated
@ -11,5 +11,7 @@
|
||||
<file url="file://$PROJECT_DIR$/MeteoInfoMap" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/MeteoInfoMap/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/MeteoInfoMap/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/meteoinfo-console/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/meteoinfo-console/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
13
.idea/libraries/Maven__com_fifesoft_rsyntaxtextarea_2_6_0.xml
generated
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.fifesoft:rsyntaxtextarea:2.6.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fifesoft/rsyntaxtextarea/2.6.0/rsyntaxtextarea-2.6.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fifesoft/rsyntaxtextarea/2.6.0/rsyntaxtextarea-2.6.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fifesoft/rsyntaxtextarea/2.6.0/rsyntaxtextarea-2.6.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
15
.idea/libraries/Maven__org_meteothink_meteoinfo_numeric_2_3_1.xml
generated
Normal file
@ -0,0 +1,15 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.meteothink:meteoinfo-numeric:2.3.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/meteothink/meteoinfo-numeric/2.3.1/meteoinfo-numeric-2.3.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/meteoinfo-numeric/meteoinfo-numeric-2.3.1-javadoc.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/meteothink/meteoinfo-numeric/2.3.1/meteoinfo-numeric-2.3.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/meteoinfo-numeric/meteoinfo-numeric-2.3.1-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/meteothink/meteoinfo-numeric/2.3.1/meteoinfo-numeric-2.3.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
5
.idea/misc.xml
generated
@ -6,6 +6,11 @@
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="ignoredFiles">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$/meteoinfo-numeric/pom.xml" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="false" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/classes" />
|
||||
|
||||
1
.idea/modules.xml
generated
@ -6,6 +6,7 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/MeteoInfoLab/MeteoInfoLab.iml" filepath="$PROJECT_DIR$/MeteoInfoLab/MeteoInfoLab.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/MeteoInfoLib/MeteoInfoLib.iml" filepath="$PROJECT_DIR$/MeteoInfoLib/MeteoInfoLib.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/MeteoInfoMap/MeteoInfoMap.iml" filepath="$PROJECT_DIR$/MeteoInfoMap/MeteoInfoMap.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/meteoinfo-console/meteoinfo-console.iml" filepath="$PROJECT_DIR$/meteoinfo-console/meteoinfo-console.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@ -82,6 +82,7 @@
|
||||
<orderEntry type="library" name="Maven: com.formdev:flatlaf:0.40" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.formdev:flatlaf-extras:0.40" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.formdev:svgSalamander:1.1.2.1" level="project" />
|
||||
<orderEntry type="module" module-name="meteoinfo-console" />
|
||||
<orderEntry type="library" name="Maven: de.sciss:docking-frames-common:2.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.sciss:docking-frames-core:2.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fifesoft:autocomplete:2.6.0" level="project" />
|
||||
|
||||
@ -21,10 +21,12 @@
|
||||
<OpenedFiles>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\isosurface_1.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\toolbox\miml\deep_learning\mnist_1.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\bar_cylinder_1.py"/>
|
||||
</OpenedFiles>
|
||||
<RecentFiles>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\isosurface_1.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\toolbox\miml\deep_learning\mnist_1.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\bar_cylinder_1.py"/>
|
||||
</RecentFiles>
|
||||
</File>
|
||||
<Font>
|
||||
@ -32,5 +34,5 @@
|
||||
</Font>
|
||||
<LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/>
|
||||
<Figure DoubleBuffering="true"/>
|
||||
<Startup MainFormLocation="0,1" MainFormSize="1280,680"/>
|
||||
<Startup MainFormLocation="0,0" MainFormSize="1280,680"/>
|
||||
</MeteoInfo>
|
||||
|
||||
@ -14,6 +14,11 @@
|
||||
<artifactId>MeteoInfoLib</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>meteoinfo-console</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.sciss</groupId>
|
||||
<artifactId>docking-frames-common</artifactId>
|
||||
|
||||
@ -15,7 +15,7 @@ from org.meteoinfo.data.meteodata.netcdf import NetCDFDataInfo
|
||||
from org.meteoinfo.math.interpolate import InterpUtil
|
||||
from org.meteoinfo.ndarray import Array, Dimension
|
||||
from org.meteoinfo.geoprocess import GeometryUtil
|
||||
from org.meteoinfo.laboratory.util import JythonUtil
|
||||
from org.meteoinfo.util import JythonUtil
|
||||
from org.python.core import PyComplex
|
||||
|
||||
from dimarray import PyGridData, DimArray, PyStationData
|
||||
|
||||
@ -25,7 +25,7 @@ import org.meteoinfo.global.DataConvert;
|
||||
import org.meteoinfo.global.util.FontUtil;
|
||||
import org.meteoinfo.global.util.GlobalUtil;
|
||||
import org.meteoinfo.laboratory.gui.FrmMain;
|
||||
import org.meteoinfo.laboratory.gui.MyPythonInterpreter;
|
||||
import org.meteoinfo.console.jython.MyPythonInterpreter;
|
||||
import org.python.core.Py;
|
||||
import org.python.core.PySystemState;
|
||||
import org.python.util.InteractiveConsole;
|
||||
|
||||
@ -9,7 +9,7 @@ import java.awt.EventQueue;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextArea;
|
||||
import org.meteoinfo.laboratory.gui.JTextAreaPrintStream;
|
||||
import org.meteoinfo.console.editor.JTextAreaPrintStream;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -8,6 +8,7 @@ package org.meteoinfo.laboratory.gui;
|
||||
import bibliothek.gui.dock.common.DefaultSingleCDockable;
|
||||
import bibliothek.gui.dock.common.action.CAction;
|
||||
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||
import org.meteoinfo.console.ConsoleColors;
|
||||
import org.meteoinfo.console.JConsole;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
@ -22,7 +23,8 @@ import java.util.logging.Logger;
|
||||
import javax.swing.*;
|
||||
|
||||
import org.meteoinfo.chart.IChartPanel;
|
||||
import org.meteoinfo.laboratory.codecomplete.JIntrospect;
|
||||
import org.meteoinfo.console.jython.JIntrospect;
|
||||
import org.meteoinfo.console.jython.PythonInteractiveInterpreter;
|
||||
import org.python.core.Py;
|
||||
|
||||
/**
|
||||
|
||||
@ -39,8 +39,12 @@ import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||
import org.fife.ui.rsyntaxtextarea.SyntaxConstants;
|
||||
import org.fife.ui.rsyntaxtextarea.TextEditorPane;
|
||||
import org.fife.ui.rsyntaxtextarea.Theme;
|
||||
import org.meteoinfo.console.editor.JTextAreaPrintStream;
|
||||
import org.meteoinfo.console.editor.JTextAreaWriter;
|
||||
import org.meteoinfo.console.editor.MITextEditorPane;
|
||||
import org.meteoinfo.console.editor.TextEditor;
|
||||
import org.meteoinfo.global.GenericFileFilter;
|
||||
import org.meteoinfo.laboratory.codecomplete.JIntrospect;
|
||||
import org.meteoinfo.console.jython.JIntrospect;
|
||||
import org.meteoinfo.ui.ButtonTabComponent;
|
||||
import org.python.util.PythonInterpreter;
|
||||
|
||||
@ -147,7 +151,7 @@ public class EditorDockable extends DefaultSingleCDockable {
|
||||
final TextEditor tab = new TextEditor(tabbedPanel, title);
|
||||
tabbedPanel.add(tab, title);
|
||||
tabbedPanel.setSelectedComponent(tab);
|
||||
final MITextEditorPane textArea = (MITextEditorPane) tab.getTextArea();
|
||||
final MITextEditorPane textArea = (MITextEditorPane) tab.getTextArea();
|
||||
textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_PYTHON);
|
||||
textArea.discardAllEdits();
|
||||
this.theme.apply(textArea);
|
||||
|
||||
@ -26,6 +26,7 @@ import org.meteoinfo.chart.ChartPanel;
|
||||
import org.meteoinfo.chart.IChartPanel;
|
||||
import org.meteoinfo.chart.MouseMode;
|
||||
import org.meteoinfo.chart.jogl.GLChartPanel;
|
||||
import org.meteoinfo.console.jython.PythonInteractiveInterpreter;
|
||||
import org.meteoinfo.ui.ButtonTabComponent;
|
||||
import org.scilab.forge.jlatexmath.Char;
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@ import java.util.List;
|
||||
import javax.swing.JOptionPane;
|
||||
import org.fife.ui.rtextarea.SearchContext;
|
||||
import org.fife.ui.rtextarea.SearchEngine;
|
||||
import org.meteoinfo.console.editor.TextEditor;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -33,14 +33,16 @@ import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import bibliothek.gui.dock.common.theme.ThemeMap;
|
||||
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||
import org.meteoinfo.console.ConsoleExecEvent;
|
||||
import org.meteoinfo.console.IConsoleExecListener;
|
||||
import org.meteoinfo.console.editor.TextEditor;
|
||||
import org.meteoinfo.console.jython.PythonInteractiveInterpreter;
|
||||
import org.meteoinfo.global.colors.ColorMap;
|
||||
import org.meteoinfo.global.colors.ColorUtil;
|
||||
import org.meteoinfo.laboratory.Options;
|
||||
import org.meteoinfo.laboratory.application.AppCollection;
|
||||
import org.meteoinfo.laboratory.application.Application;
|
||||
import org.meteoinfo.laboratory.event.ConsoleExecEvent;
|
||||
import org.meteoinfo.laboratory.event.CurrentPathChangedEvent;
|
||||
import org.meteoinfo.laboratory.event.IConsoleExecListener;
|
||||
import org.meteoinfo.laboratory.event.ICurrentPathChangedListener;
|
||||
import org.meteoinfo.legend.LayersLegend;
|
||||
import org.meteoinfo.map.MapView;
|
||||
|
||||
@ -19,6 +19,7 @@ import javax.swing.SwingUtilities;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.UnsupportedLookAndFeelException;
|
||||
import org.fife.ui.rsyntaxtextarea.Theme;
|
||||
import org.meteoinfo.console.editor.TextEditor;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -14,6 +14,7 @@ import javax.swing.JButton;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTabbedPane;
|
||||
import org.fife.ui.rsyntaxtextarea.SyntaxConstants;
|
||||
import org.meteoinfo.console.editor.TextEditor;
|
||||
import org.meteoinfo.ui.ButtonTabComponent;
|
||||
|
||||
/**
|
||||
|
||||
@ -1,259 +0,0 @@
|
||||
/* Copyright 2012 Yaqiang Wang,
|
||||
* yaqiang.wang@gmail.com
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This library 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 Lesser
|
||||
* General Public License for more details.
|
||||
*/
|
||||
package org.meteoinfo.laboratory.gui;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Font;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTabbedPane;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
import org.fife.ui.rsyntaxtextarea.SyntaxScheme;
|
||||
import org.fife.ui.rsyntaxtextarea.TextEditorPane;
|
||||
import org.fife.ui.rsyntaxtextarea.Theme;
|
||||
import org.fife.ui.rtextarea.RTextScrollPane;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Yaqiang Wang
|
||||
*/
|
||||
public class TextEditor extends JPanel {
|
||||
// <editor-fold desc="Variables">
|
||||
|
||||
private MITextEditorPane _textArea;
|
||||
private String _title;
|
||||
private File _file = null;
|
||||
private JTabbedPane _parent;
|
||||
// </editor-fold>
|
||||
// <editor-fold desc="Constructor">
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param parent Parent
|
||||
* @param title Title text
|
||||
*/
|
||||
public TextEditor(JTabbedPane parent, String title) {
|
||||
super();
|
||||
this.setLayout(new BorderLayout());
|
||||
_title = title;
|
||||
_parent = parent;
|
||||
_textArea = new MITextEditorPane();
|
||||
_textArea.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
checkUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
checkUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
checkUpdate();
|
||||
}
|
||||
});
|
||||
//_textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_PYTHON);
|
||||
//_textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_GROOVY);
|
||||
_textArea.setCodeFoldingEnabled(true);
|
||||
_textArea.setAntiAliasingEnabled(true);
|
||||
//_textArea.setEncoding("GB2312");
|
||||
_textArea.setEncoding("utf-8");
|
||||
_textArea.setTabSize(4);
|
||||
_textArea.setTabsEmulated(true);
|
||||
|
||||
RTextScrollPane sp = new RTextScrollPane(_textArea);
|
||||
sp.setFoldIndicatorEnabled(true);
|
||||
this.add(sp);
|
||||
}
|
||||
// </editor-fold>
|
||||
// <editor-fold desc="Get Set Methods">
|
||||
|
||||
/**
|
||||
* Get text area
|
||||
*
|
||||
* @return The RSyntaxTextArea
|
||||
*/
|
||||
public TextEditorPane getTextArea() {
|
||||
return _textArea;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get title text
|
||||
*
|
||||
* @return Title text
|
||||
*/
|
||||
public String getTitle() {
|
||||
return _title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set title text
|
||||
*
|
||||
* @param value Title text
|
||||
*/
|
||||
public void setTitle(String value) {
|
||||
//int idx = _parent.indexOfTab(_title);
|
||||
int idx = _parent.indexOfComponent(this);
|
||||
_title = value;
|
||||
_parent.setTitleAt(idx, _title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file
|
||||
*
|
||||
* @return File
|
||||
*/
|
||||
public File getFile(){
|
||||
return _file;
|
||||
}
|
||||
|
||||
public void setFile(File file){
|
||||
_file = file;
|
||||
setTitle(_file.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file name
|
||||
*
|
||||
* @return File name
|
||||
*/
|
||||
public String getFileName() {
|
||||
if (_file == null) {
|
||||
return "";
|
||||
} else {
|
||||
return _file.getAbsolutePath();
|
||||
}
|
||||
}
|
||||
// </editor-fold>
|
||||
// <editor-fold desc="Methods">
|
||||
|
||||
/**
|
||||
* Open file
|
||||
*
|
||||
* @param file The file
|
||||
*/
|
||||
public void openFile(File file) {
|
||||
if (file.isDirectory()) { // Clicking on a space character
|
||||
JOptionPane.showMessageDialog(this, file.getAbsolutePath()
|
||||
+ " is a directory", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
} else if (!file.isFile()) {
|
||||
JOptionPane.showMessageDialog(this, "No such file: "
|
||||
+ file.getAbsolutePath(), "Error", JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
BufferedReader r = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
|
||||
//BufferedReader r = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
|
||||
_textArea.read(r, null);
|
||||
r.close();
|
||||
//String estr = _textArea.getEncoding();
|
||||
//_textArea.setEncoding("UTF-8");
|
||||
//_textArea.setEncoding("GB2312");
|
||||
//_textArea.save();
|
||||
|
||||
// FileLocation fl = FileLocation.create(file);
|
||||
// this._textArea.load(fl, null);
|
||||
// String estr = _textArea.getEncoding();
|
||||
// //_textArea.setEncoding("UTF-8");
|
||||
// //_textArea.setEncoding("GB2312");
|
||||
// _textArea.save();
|
||||
|
||||
setFile(file);
|
||||
_textArea.discardAllEdits();
|
||||
_textArea.setDirty(false);
|
||||
} catch (IOException ioe) {
|
||||
UIManager.getLookAndFeel().provideErrorFeedback(_textArea);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save file
|
||||
*
|
||||
* @param file The file
|
||||
*/
|
||||
public void saveFile(File file) {
|
||||
OutputStreamWriter w = null;
|
||||
try {
|
||||
w = new OutputStreamWriter(new FileOutputStream(file.getAbsolutePath()), "UTF-8");
|
||||
_textArea.write(w);
|
||||
} catch (FileNotFoundException ex) {
|
||||
Logger.getLogger(TextEditor.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(TextEditor.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} finally {
|
||||
try {
|
||||
w.close();
|
||||
setFile(file);
|
||||
_textArea.setDirty(false);
|
||||
checkUpdate();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(TextEditor.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkUpdate() {
|
||||
String title = _title;
|
||||
if (_title.substring(_title.length() - 1).equals("*")) {
|
||||
_title = _title.substring(0, _title.length() - 1);
|
||||
}
|
||||
|
||||
if (_textArea.isDirty()) {
|
||||
_title = _title + '*';
|
||||
}
|
||||
|
||||
if (!title.equals(_title)) {
|
||||
//int idx = _parent.indexOfTab(title);
|
||||
int idx = _parent.indexOfComponent(this);
|
||||
_parent.setTitleAt(idx, _title);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the font for all token types.
|
||||
*
|
||||
* @param font The font to use.
|
||||
*/
|
||||
public void setTextFont(Font font) {
|
||||
if (font != null) {
|
||||
SyntaxScheme ss = _textArea.getSyntaxScheme();
|
||||
ss = (SyntaxScheme) ss.clone();
|
||||
for (int i = 0; i < ss.getStyleCount(); i++) {
|
||||
if (ss.getStyle(i) != null) {
|
||||
ss.getStyle(i).font = font;
|
||||
}
|
||||
}
|
||||
_textArea.setSyntaxScheme(ss);
|
||||
_textArea.setFont(font);
|
||||
}
|
||||
}
|
||||
// </editor-fold>
|
||||
}
|
||||
|
Before Width: | Height: | Size: 79 B |
|
Before Width: | Height: | Size: 604 B |
|
Before Width: | Height: | Size: 586 B |
|
Before Width: | Height: | Size: 81 B |
|
Before Width: | Height: | Size: 78 B |
|
Before Width: | Height: | Size: 587 B |
|
Before Width: | Height: | Size: 361 B |
|
Before Width: | Height: | Size: 590 B |
|
Before Width: | Height: | Size: 586 B |
|
Before Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 118 B |
|
Before Width: | Height: | Size: 87 B |
|
Before Width: | Height: | Size: 119 B |
|
Before Width: | Height: | Size: 124 B |
|
Before Width: | Height: | Size: 64 B |
|
Before Width: | Height: | Size: 82 B |
|
Before Width: | Height: | Size: 114 B |
|
Before Width: | Height: | Size: 185 B |
|
Before Width: | Height: | Size: 121 B |
|
Before Width: | Height: | Size: 604 B |
|
Before Width: | Height: | Size: 603 B |
|
Before Width: | Height: | Size: 600 B |
|
Before Width: | Height: | Size: 586 B |
|
Before Width: | Height: | Size: 595 B |
|
Before Width: | Height: | Size: 594 B |
|
Before Width: | Height: | Size: 592 B |
|
Before Width: | Height: | Size: 574 B |
|
Before Width: | Height: | Size: 595 B |
|
Before Width: | Height: | Size: 574 B |
|
Before Width: | Height: | Size: 570 B |
|
Before Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 152 B |
|
Before Width: | Height: | Size: 176 B |
|
Before Width: | Height: | Size: 183 B |
|
Before Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 193 B |
|
Before Width: | Height: | Size: 227 B |
|
Before Width: | Height: | Size: 79 B |
|
Before Width: | Height: | Size: 165 B |
|
Before Width: | Height: | Size: 359 B |
|
Before Width: | Height: | Size: 324 B |
|
Before Width: | Height: | Size: 196 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 276 B |
|
Before Width: | Height: | Size: 197 B |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 466 B |
|
Before Width: | Height: | Size: 666 B |
|
Before Width: | Height: | Size: 378 B |
|
Before Width: | Height: | Size: 389 B |
|
Before Width: | Height: | Size: 261 B |
|
Before Width: | Height: | Size: 177 B |
|
Before Width: | Height: | Size: 275 B |
|
Before Width: | Height: | Size: 408 B |
|
Before Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 498 B |
|
Before Width: | Height: | Size: 582 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 280 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 591 B |
|
Before Width: | Height: | Size: 174 B |
|
Before Width: | Height: | Size: 736 B |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 589 B |
|
Before Width: | Height: | Size: 523 B |
|
Before Width: | Height: | Size: 699 B |
|
Before Width: | Height: | Size: 678 B |
|
Before Width: | Height: | Size: 536 B |
|
Before Width: | Height: | Size: 688 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 943 B |
|
Before Width: | Height: | Size: 903 B |
|
Before Width: | Height: | Size: 962 B |
|
Before Width: | Height: | Size: 912 B |