jsynedit
Class AbstractEditorPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JRootPane
                  extended by jsynedit.AbstractEditorPanel
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.AncestorListener, javax.swing.event.ChangeListener

public class AbstractEditorPanel
extends javax.swing.JRootPane
implements java.awt.event.ActionListener, javax.swing.event.AncestorListener, javax.swing.event.ChangeListener

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JRootPane
javax.swing.JRootPane.AccessibleJRootPane, javax.swing.JRootPane.RootLayout
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  javax.swing.JPanel commandPanel
           
protected  java.lang.String extens
           
protected  FindReplace findReplace
           
protected  AbstractDoc inputArea
           
protected  javax.swing.JComboBox languages
           
static boolean LOAD
           
protected  javax.swing.JMenuBar menubar
           
protected  OptionsDialog optionsDialog
           
protected  java.io.PrintWriter out
           
protected  javax.swing.JTextArea outputArea
           
protected  javax.swing.JTabbedPane pane
           
static boolean SAVE
           
protected  javax.swing.JToolBar toolBar
           
protected  javax.swing.JTabbedPane vTabbedPane
           
 
Fields inherited from class javax.swing.JRootPane
COLOR_CHOOSER_DIALOG, contentPane, defaultButton, defaultPressAction, defaultReleaseAction, ERROR_DIALOG, FILE_CHOOSER_DIALOG, FRAME, glassPane, INFORMATION_DIALOG, layeredPane, menuBar, NONE, PLAIN_DIALOG, QUESTION_DIALOG, WARNING_DIALOG
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AbstractEditorPanel()
           
AbstractEditorPanel(AbstractEditorAgent ag)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
static void addMenuItem(java.awt.event.ActionListener al, javax.swing.JMenu m, java.lang.String label, java.lang.String command, int key)
           
static void addMenuItem(java.awt.event.ActionListener al, javax.swing.JMenu m, java.lang.String label, java.lang.String command, int key, int ckey)
           
 void addTool(javax.swing.JToolBar toolBar, java.lang.String name, java.lang.String descr, java.lang.String imageName)
           
 void ancestorAdded(javax.swing.event.AncestorEvent event)
           
 void ancestorMoved(javax.swing.event.AncestorEvent event)
           
 void ancestorRemoved(javax.swing.event.AncestorEvent event)
           
 void applyTheme(java.lang.String theme)
           
 void applyThemeIcon(java.lang.String theme)
           
 java.lang.String chooseTokenMarker(java.lang.String ext)
           
 void clear()
           
 void clearOutputArea()
           
 void closeCurentTabbedPane()
           
 void closeTabbedPane(int id)
           
 void command(java.lang.String c)
           
 void enableShortcuts(AbstractDoc doc)
           
static boolean getBooleanProperty(java.lang.String name)
          Returns true if the property value equals to "on" or "true"
 java.lang.String getCurrentFile()
           
 java.lang.String getExtension(java.lang.String s)
           
 javax.swing.JFileChooser getFileChooser(int mode)
           
protected  boolean getFileDialog(boolean direction, java.lang.String title, java.lang.String extens)
           
 java.awt.Frame getFrameParent()
           
static java.lang.String getHomeDirectory()
           
 javax.swing.JMenuBar getMenubar()
           
 javax.swing.JTextArea getOutputArea()
           
static java.lang.String getProperty(java.lang.String name)
          If we store properties, we need to read them, too !
static java.lang.String getProperty(java.lang.String name, java.lang.Object[] args)
          Returns the property with the specified name, formatting it with the java.text.MessageFormat.format() method.
static java.lang.String getProperty(java.lang.String name, java.lang.String def)
          Fetches a property, returning the default value if it's not defined.
 javax.swing.JTabbedPane getTabbedPane()
           
 AbstractDoc getTextArea()
           
 AbstractDoc[] getTextAreas()
           
 javax.swing.JToolBar getToolbar()
           
static java.lang.String getUserDirectory()
          Returns user directory.
 javax.swing.JTabbedPane getVerticalTabbedPane()
           
 void hideWaitCursor()
          Hides the wait cursor.
 void initCommentProperties(java.lang.String block, java.lang.String start, java.lang.String end, java.lang.String box)
           
 void initProperties()
           
static boolean match(java.lang.String pattern, java.lang.String string)
          This method can determine if a String matches a pattern of wildcards
 void newBuffer(java.lang.String text)
           
 void newFile()
           
 void openFile()
           
 void openFile(java.lang.String filename)
           
 void print(java.lang.String s)
           
 void println(java.lang.String s)
           
 void propertiesChanged()
           
 void quit()
           
 boolean readFile(java.io.File f)
           
 boolean readFile(java.lang.String s)
           
 void save()
           
 void saveAll()
           
 void saveAs()
           
 void selectCorrectLanguage(java.lang.String filename)
           
 void setExtens(java.lang.String ext)
           
static void setProperty(java.lang.String name, java.lang.String value)
          Set a property.
 void showWaitCursor()
          Shows the wait cursor.
 void stateChanged(javax.swing.event.ChangeEvent e)
          Update the current textArea corresponding to current TabbedPane.
 java.io.PrintWriter stderr()
           
 java.io.InputStream stdin()
           
 java.io.PrintWriter stdout()
           
 void triggerTabbedPanes()
           
static void unsetProperty(java.lang.String name)
          Unsets (clears) a property.
 
Methods inherited from class javax.swing.JRootPane
addImpl, addNotify, createContentPane, createGlassPane, createLayeredPane, createRootLayout, getAccessibleContext, getContentPane, getDefaultButton, getGlassPane, getJMenuBar, getLayeredPane, getMenuBar, getUI, getUIClassID, getWindowDecorationStyle, isOptimizedDrawingEnabled, isValidateRoot, paramString, removeNotify, setContentPane, setDefaultButton, setGlassPane, setJMenuBar, setLayeredPane, setMenuBar, setUI, setWindowDecorationStyle, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

inputArea

protected AbstractDoc inputArea

outputArea

protected javax.swing.JTextArea outputArea

out

protected java.io.PrintWriter out

toolBar

protected javax.swing.JToolBar toolBar

menubar

protected javax.swing.JMenuBar menubar

commandPanel

protected javax.swing.JPanel commandPanel

findReplace

protected FindReplace findReplace

pane

protected javax.swing.JTabbedPane pane

vTabbedPane

protected javax.swing.JTabbedPane vTabbedPane

languages

protected javax.swing.JComboBox languages

optionsDialog

protected OptionsDialog optionsDialog

LOAD

public static final boolean LOAD
See Also:
Constant Field Values

SAVE

public static final boolean SAVE
See Also:
Constant Field Values

extens

protected java.lang.String extens
Constructor Detail

AbstractEditorPanel

public AbstractEditorPanel(AbstractEditorAgent ag)

AbstractEditorPanel

public AbstractEditorPanel()
Method Detail

stdout

public java.io.PrintWriter stdout()

stderr

public java.io.PrintWriter stderr()

stdin

public java.io.InputStream stdin()

getTextArea

public AbstractDoc getTextArea()

getTextAreas

public AbstractDoc[] getTextAreas()

getTabbedPane

public javax.swing.JTabbedPane getTabbedPane()

getFileChooser

public javax.swing.JFileChooser getFileChooser(int mode)

getOutputArea

public javax.swing.JTextArea getOutputArea()

getToolbar

public javax.swing.JToolBar getToolbar()

getMenubar

public javax.swing.JMenuBar getMenubar()

applyTheme

public void applyTheme(java.lang.String theme)

applyThemeIcon

public void applyThemeIcon(java.lang.String theme)

setProperty

public static void setProperty(java.lang.String name,
                               java.lang.String value)
Set a property.

Parameters:
name - Property's name
value - The value to store as name

getProperty

public static java.lang.String getProperty(java.lang.String name)
If we store properties, we need to read them, too !

Parameters:
name - The name of the property to read
Returns:
The value of the specified property

getProperty

public static final java.lang.String getProperty(java.lang.String name,
                                                 java.lang.String def)
Fetches a property, returning the default value if it's not defined.

Parameters:
name - The property
def - The default value

propertiesChanged

public void propertiesChanged()

getProperty

public static final java.lang.String getProperty(java.lang.String name,
                                                 java.lang.Object[] args)
Returns the property with the specified name, formatting it with the java.text.MessageFormat.format() method.

Parameters:
name - The property
args - The positional parameters

getBooleanProperty

public static boolean getBooleanProperty(java.lang.String name)
Returns true if the property value equals to "on" or "true"

Parameters:
name - The name of the property to read

initProperties

public void initProperties()

initCommentProperties

public void initCommentProperties(java.lang.String block,
                                  java.lang.String start,
                                  java.lang.String end,
                                  java.lang.String box)

unsetProperty

public static void unsetProperty(java.lang.String name)
Unsets (clears) a property.

Parameters:
name - The property

getVerticalTabbedPane

public javax.swing.JTabbedPane getVerticalTabbedPane()

triggerTabbedPanes

public void triggerTabbedPanes()

ancestorAdded

public void ancestorAdded(javax.swing.event.AncestorEvent event)
Specified by:
ancestorAdded in interface javax.swing.event.AncestorListener

ancestorMoved

public void ancestorMoved(javax.swing.event.AncestorEvent event)
Specified by:
ancestorMoved in interface javax.swing.event.AncestorListener

ancestorRemoved

public void ancestorRemoved(javax.swing.event.AncestorEvent event)
Specified by:
ancestorRemoved in interface javax.swing.event.AncestorListener

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Update the current textArea corresponding to current TabbedPane.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener
Parameters:
e - the event informing changes on the TabbedPane

match

public static boolean match(java.lang.String pattern,
                            java.lang.String string)
This method can determine if a String matches a pattern of wildcards

Parameters:
pattern - The pattern used for comparison
string - The String to be checked
Returns:
true if string matches pattern

getUserDirectory

public static java.lang.String getUserDirectory()
Returns user directory.


showWaitCursor

public void showWaitCursor()
Shows the wait cursor.


hideWaitCursor

public void hideWaitCursor()
Hides the wait cursor.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

command

public void command(java.lang.String c)

closeCurentTabbedPane

public void closeCurentTabbedPane()

closeTabbedPane

public void closeTabbedPane(int id)

clearOutputArea

public void clearOutputArea()

newFile

public void newFile()

getFrameParent

public java.awt.Frame getFrameParent()

getHomeDirectory

public static java.lang.String getHomeDirectory()

setExtens

public void setExtens(java.lang.String ext)

getFileDialog

protected boolean getFileDialog(boolean direction,
                                java.lang.String title,
                                java.lang.String extens)

openFile

public void openFile(java.lang.String filename)

openFile

public void openFile()

getExtension

public java.lang.String getExtension(java.lang.String s)

chooseTokenMarker

public java.lang.String chooseTokenMarker(java.lang.String ext)

selectCorrectLanguage

public void selectCorrectLanguage(java.lang.String filename)

readFile

public boolean readFile(java.lang.String s)

readFile

public boolean readFile(java.io.File f)

saveAs

public void saveAs()

saveAll

public void saveAll()

save

public void save()

clear

public void clear()

quit

public void quit()

print

public void print(java.lang.String s)

println

public void println(java.lang.String s)

addTool

public void addTool(javax.swing.JToolBar toolBar,
                    java.lang.String name,
                    java.lang.String descr,
                    java.lang.String imageName)

addMenuItem

public static void addMenuItem(java.awt.event.ActionListener al,
                               javax.swing.JMenu m,
                               java.lang.String label,
                               java.lang.String command,
                               int key)

addMenuItem

public static void addMenuItem(java.awt.event.ActionListener al,
                               javax.swing.JMenu m,
                               java.lang.String label,
                               java.lang.String command,
                               int key,
                               int ckey)

enableShortcuts

public void enableShortcuts(AbstractDoc doc)

getCurrentFile

public java.lang.String getCurrentFile()

newBuffer

public void newBuffer(java.lang.String text)


Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.