nxceestiViewAndControl
Class NXCEestiView

java.lang.Object
  extended by org.jdesktop.application.AbstractBean
      extended by org.jdesktop.application.View
          extended by org.jdesktop.application.FrameView
              extended by nxceestiViewAndControl.NXCEestiView

public class NXCEestiView
extends org.jdesktop.application.FrameView

Programmi põhivaade


Nested Class Summary
private  class NXCEestiView.ConfirmExit
          Tegevused programmi sulgemisel
private  class NXCEestiView.LoadFileTask
          Faili laadimine
 
Field Summary
private  javax.swing.JDialog aboutBox
           
private  int busyIconIndex
           
private  javax.swing.Icon[] busyIcons
           
private  javax.swing.Timer busyIconTimer
           
private  javax.swing.JMenuItem closeApp
           
private  javax.swing.JMenuItem compilerOptions
           
private  javax.swing.JDialog compilerSettings
           
 javax.swing.text.EditorKit ConsoleEditorKit
           
private  javax.swing.JPanel consoleHeader
           
private  javax.swing.JLabel consoleName
           
private  javax.swing.JScrollPane consoleScroll
           
private  javax.swing.JTextPane consoleText
           
private  javax.swing.JPanel consoleView
           
private  javax.swing.JMenuItem constantsFile
           
private  javax.swing.JButton copyButton
           
private  javax.swing.JMenuItem copyOption
           
private  javax.swing.JMenuItem createNewFile
           
private  javax.swing.JButton cutButton
           
private  javax.swing.JMenuItem cutOption
           
private  javax.swing.JMenu editMenu
           
private  javax.swing.JSplitPane editorCompilerSplit
           
private  javax.swing.JMenu editorFiles
           
 javax.swing.text.EditorKit EditorKit
           
private  javax.swing.JScrollPane editorScroll
           
private  javax.swing.JTextPane example
           
 javax.swing.text.EditorKit exampleEditorKit
           
private  java.io.File file
           
private  java.lang.String filename
           
private  javax.swing.JButton hideConsole
           
private  javax.swing.JButton hideTemplates
           
private  javax.swing.Icon idleIcon
           
private  javax.swing.JLabel infoName
           
private  javax.swing.JPanel infoPanel
           
private  javax.swing.JScrollPane infoScroll
           
private  javax.swing.JMenuItem keywordsFile
           
private  javax.swing.JButton leftTabButton
           
private  javax.swing.JPanel mainPanel
           
private  javax.swing.JSplitPane mainSplit
           
private  javax.swing.JMenuItem manualOption
           
private  javax.swing.JMenuBar menuBar
           
private  javax.swing.JMenuItem menuRedo
           
private  javax.swing.JMenuItem menuTemplates
           
private  javax.swing.JMenuItem menuUndo
           
private  javax.swing.Timer messageTimer
           
private  boolean modified
           
private  javax.swing.JButton newFileButton
           
private  javax.swing.JMenuItem NXCAPIFile
           
private  javax.swing.JMenuItem NXCEestiApiFile
           
private  javax.swing.JButton openButton
           
private  javax.swing.JMenuItem openExisting
           
private  javax.swing.JButton pasteButton
           
private  javax.swing.JMenuItem pasteOption
           
private  javax.swing.JProgressBar progressBar
           
private  javax.swing.JButton redoButton
           
private  javax.swing.JMenuItem resetSettings
           
private  javax.swing.JButton rightTabButton
           
private  javax.swing.tree.DefaultMutableTreeNode root
           
private  javax.swing.JButton runButton
           
private  javax.swing.JButton saveButton
           
private  javax.swing.JMenuItem saveMe
           
private  javax.swing.JMenuItem saveWithName
           
private  javax.swing.JMenuItem selectAll
           
private  javax.swing.JButton selectAllButton
           
private  ParametersReader settings
           
private  javax.swing.JMenu settingsMenu
           
private  javax.swing.JDialog settingspane
           
private  javax.swing.JLabel statusAnimationLabel
           
private  javax.swing.JLabel statusMessageLabel
           
private  javax.swing.JPanel statusPanel
           
private  javax.swing.JMenuItem tabLeft
           
private  javax.swing.JMenuItem tabRight
           
private  javax.swing.JSplitPane tempatesSplit
           
private  javax.swing.JLabel TemplaadidHeader
           
private  javax.swing.JButton templatesButton
           
private  javax.swing.JDialog templatesEdit
           
private  javax.swing.JMenuItem templatesFile
           
private  javax.swing.JScrollPane TemplatesScroll
           
private  javax.swing.JTree templatestree
           
private  javax.swing.JPanel templatesView
           
private  javax.swing.JButton terminalButton
           
private  javax.swing.JMenuItem textOptions
           
private  javax.swing.JTextPane textPane
           
private  javax.swing.JToolBar toolbar
           
private  javax.swing.tree.DefaultTreeModel treeModel
           
(package private)  CompoundUndoManager um
           
private  javax.swing.JButton undoButton
           
 
Constructor Summary
NXCEestiView(org.jdesktop.application.SingleFrameApplication app)
           
 
Method Summary
 void changeFont()
          Kuvab teksti seadete muutmise vaate
 void compilerSettings()
          Kuvab kompilaatori seaded
private  javax.swing.JFileChooser createFileChooser()
          Loob faili valija ja asendab selle inglise keelsed sõnad
 java.io.File getFile()
          Tagastab redigeeritava faili
private  void initComponents()
          This method is called from within the constructor to initialize the form.
 boolean isModified()
          Kas faili on muudetud?
 void newfile()
          Loob uue nxc faili
 org.jdesktop.application.Task open()
          Olemasoleva faili otsimine ja avamine
 org.jdesktop.application.Task openApi()
          Avab tõlgete faili
 org.jdesktop.application.Task openConstants()
          Avab konstantide faili
 org.jdesktop.application.Task openEditorFile(java.io.File file)
          Avab etteantud faili
 org.jdesktop.application.Task openKeywords()
          Avab märksõnade faili
 org.jdesktop.application.Task openNxcApi()
          Avab NXC API faili
 org.jdesktop.application.Task openTemplates()
          Avab templaatide faili
 void redo()
          Taastab just unustatud tegevuse
 void refreshScreen()
          Uuendab redaktori vaate sõnade värvimise ja reanumbrid
 void resetSettings()
          Taastab programi esialgsed seaded
 void resetUndomanager()
          Loob uue tegevuste unustamise/meeldetuletamise mälu
 void runNxc()
          Kompileerib aktiivse faili
 void save()
          Salvestab faili
 void saveAs()
          Salvestab faili uue nimega
 boolean saveConfirmation()
          Salvestamise kinnitus
 void selectAll()
          Selekteerib kogu vaate sisu
private  void setFile(java.io.File file)
          Määrab programmile uue redigeeritava faili
private  void setModified(boolean modified)
          Määrab, et faili on muudetud ja seda saaks salvestada
 void showAboutBox()
          Kuvab programmi info akna
 void showConsole()
          Näitab/peidab kompilaatori väljundi
private  void showExample(java.awt.event.MouseEvent evt)
          Kuvab templaadi kirjelduse
 void showHelp()
          Avab programmi kasutusjuhendi
 void showTemplates()
          Näitab/peidab templaatide vaate
 void showTemplatesEdit()
          Kuvab programmi info akna
 void undo()
          Unustab viimati tehtud tegevuse
 void updateUndoRedoButtons()
          Uuendab unustamise ja taasloomise nuppude olekud
 
Methods inherited from class org.jdesktop.application.FrameView
getFrame, getRootPane, setFrame
 
Methods inherited from class org.jdesktop.application.View
getApplication, getComponent, getContext, getMenuBar, getResourceMap, getStatusBar, getToolBar, getToolBars, setComponent, setMenuBar, setStatusBar, setToolBar, setToolBars
 
Methods inherited from class org.jdesktop.application.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

settings

private ParametersReader settings

filename

private java.lang.String filename

file

private java.io.File file

modified

private boolean modified

um

CompoundUndoManager um

EditorKit

public javax.swing.text.EditorKit EditorKit

ConsoleEditorKit

public javax.swing.text.EditorKit ConsoleEditorKit

exampleEditorKit

public javax.swing.text.EditorKit exampleEditorKit

root

private javax.swing.tree.DefaultMutableTreeNode root

treeModel

private javax.swing.tree.DefaultTreeModel treeModel

NXCAPIFile

private javax.swing.JMenuItem NXCAPIFile

NXCEestiApiFile

private javax.swing.JMenuItem NXCEestiApiFile

TemplaadidHeader

private javax.swing.JLabel TemplaadidHeader

TemplatesScroll

private javax.swing.JScrollPane TemplatesScroll

closeApp

private javax.swing.JMenuItem closeApp

compilerOptions

private javax.swing.JMenuItem compilerOptions

consoleHeader

private javax.swing.JPanel consoleHeader

consoleName

private javax.swing.JLabel consoleName

consoleScroll

private javax.swing.JScrollPane consoleScroll

consoleText

private javax.swing.JTextPane consoleText

consoleView

private javax.swing.JPanel consoleView

constantsFile

private javax.swing.JMenuItem constantsFile

copyButton

private javax.swing.JButton copyButton

copyOption

private javax.swing.JMenuItem copyOption

createNewFile

private javax.swing.JMenuItem createNewFile

cutButton

private javax.swing.JButton cutButton

cutOption

private javax.swing.JMenuItem cutOption

editMenu

private javax.swing.JMenu editMenu

editorCompilerSplit

private javax.swing.JSplitPane editorCompilerSplit

editorFiles

private javax.swing.JMenu editorFiles

editorScroll

private javax.swing.JScrollPane editorScroll

example

private javax.swing.JTextPane example

hideConsole

private javax.swing.JButton hideConsole

hideTemplates

private javax.swing.JButton hideTemplates

infoName

private javax.swing.JLabel infoName

infoPanel

private javax.swing.JPanel infoPanel

infoScroll

private javax.swing.JScrollPane infoScroll

keywordsFile

private javax.swing.JMenuItem keywordsFile

leftTabButton

private javax.swing.JButton leftTabButton

mainPanel

private javax.swing.JPanel mainPanel

mainSplit

private javax.swing.JSplitPane mainSplit

manualOption

private javax.swing.JMenuItem manualOption

menuBar

private javax.swing.JMenuBar menuBar

menuRedo

private javax.swing.JMenuItem menuRedo

menuTemplates

private javax.swing.JMenuItem menuTemplates

menuUndo

private javax.swing.JMenuItem menuUndo

newFileButton

private javax.swing.JButton newFileButton

openButton

private javax.swing.JButton openButton

openExisting

private javax.swing.JMenuItem openExisting

pasteButton

private javax.swing.JButton pasteButton

pasteOption

private javax.swing.JMenuItem pasteOption

progressBar

private javax.swing.JProgressBar progressBar

redoButton

private javax.swing.JButton redoButton

resetSettings

private javax.swing.JMenuItem resetSettings

rightTabButton

private javax.swing.JButton rightTabButton

runButton

private javax.swing.JButton runButton

saveButton

private javax.swing.JButton saveButton

saveMe

private javax.swing.JMenuItem saveMe

saveWithName

private javax.swing.JMenuItem saveWithName

selectAll

private javax.swing.JMenuItem selectAll

selectAllButton

private javax.swing.JButton selectAllButton

settingsMenu

private javax.swing.JMenu settingsMenu

statusAnimationLabel

private javax.swing.JLabel statusAnimationLabel

statusMessageLabel

private javax.swing.JLabel statusMessageLabel

statusPanel

private javax.swing.JPanel statusPanel

tabLeft

private javax.swing.JMenuItem tabLeft

tabRight

private javax.swing.JMenuItem tabRight

tempatesSplit

private javax.swing.JSplitPane tempatesSplit

templatesButton

private javax.swing.JButton templatesButton

templatesFile

private javax.swing.JMenuItem templatesFile

templatesView

private javax.swing.JPanel templatesView

templatestree

private javax.swing.JTree templatestree

terminalButton

private javax.swing.JButton terminalButton

textOptions

private javax.swing.JMenuItem textOptions

textPane

private javax.swing.JTextPane textPane

toolbar

private javax.swing.JToolBar toolbar

undoButton

private javax.swing.JButton undoButton

messageTimer

private final javax.swing.Timer messageTimer

busyIconTimer

private final javax.swing.Timer busyIconTimer

idleIcon

private final javax.swing.Icon idleIcon

busyIcons

private final javax.swing.Icon[] busyIcons

busyIconIndex

private int busyIconIndex

aboutBox

private javax.swing.JDialog aboutBox

templatesEdit

private javax.swing.JDialog templatesEdit

settingspane

private javax.swing.JDialog settingspane

compilerSettings

private javax.swing.JDialog compilerSettings
Constructor Detail

NXCEestiView

public NXCEestiView(org.jdesktop.application.SingleFrameApplication app)
Method Detail

getFile

public java.io.File getFile()
Tagastab redigeeritava faili

Returns:
file

resetUndomanager

public void resetUndomanager()
Loob uue tegevuste unustamise/meeldetuletamise mälu


refreshScreen

public void refreshScreen()
Uuendab redaktori vaate sõnade värvimise ja reanumbrid


setFile

private void setFile(java.io.File file)
Määrab programmile uue redigeeritava faili

Parameters:
file -

isModified

public boolean isModified()
Kas faili on muudetud?

Returns:
bool

setModified

private void setModified(boolean modified)
Määrab, et faili on muudetud ja seda saaks salvestada

Parameters:
modified -

open

@Action
public org.jdesktop.application.Task open()
                                   throws java.io.IOException
Olemasoleva faili otsimine ja avamine

Returns:
Task
Throws:
java.io.IOException

newfile

@Action
public void newfile()
             throws java.io.IOException
Loob uue nxc faili

Throws:
java.io.IOException

selectAll

@Action
public void selectAll()
               throws java.io.IOException
Selekteerib kogu vaate sisu

Throws:
java.io.IOException

undo

@Action
public void undo()
          throws java.io.IOException
Unustab viimati tehtud tegevuse

Throws:
java.io.IOException

redo

@Action
public void redo()
          throws java.io.IOException
Taastab just unustatud tegevuse

Throws:
java.io.IOException

updateUndoRedoButtons

public void updateUndoRedoButtons()
Uuendab unustamise ja taasloomise nuppude olekud


openApi

@Action
public org.jdesktop.application.Task openApi()
                                      throws java.io.IOException
Avab tõlgete faili

Returns:
task
Throws:
java.io.IOException

openTemplates

@Action
public org.jdesktop.application.Task openTemplates()
                                            throws java.io.IOException
Avab templaatide faili

Returns:
task
Throws:
java.io.IOException

openKeywords

@Action
public org.jdesktop.application.Task openKeywords()
                                           throws java.io.IOException
Avab märksõnade faili

Returns:
task
Throws:
java.io.IOException

openConstants

@Action
public org.jdesktop.application.Task openConstants()
                                            throws java.io.IOException
Avab konstantide faili

Returns:
task
Throws:
java.io.IOException

openNxcApi

@Action
public org.jdesktop.application.Task openNxcApi()
                                         throws java.io.IOException
Avab NXC API faili

Returns:
task
Throws:
java.io.IOException

openEditorFile

public org.jdesktop.application.Task openEditorFile(java.io.File file)
                                             throws java.io.IOException
Avab etteantud faili

Parameters:
file -
Returns:
task
Throws:
java.io.IOException

save

@Action(enabledProperty="modified")
public void save()
          throws java.io.IOException
Salvestab faili

Throws:
java.io.IOException

saveAs

@Action
public void saveAs()
            throws java.io.IOException
Salvestab faili uue nimega

Throws:
java.io.IOException

createFileChooser

private javax.swing.JFileChooser createFileChooser()
Loob faili valija ja asendab selle inglise keelsed sõnad

Returns:
faili valija

showAboutBox

@Action
public void showAboutBox()
Kuvab programmi info akna


showTemplatesEdit

@Action
public void showTemplatesEdit()
Kuvab programmi info akna


changeFont

@Action
public void changeFont()
Kuvab teksti seadete muutmise vaate


compilerSettings

@Action
public final void compilerSettings()
Kuvab kompilaatori seaded


showTemplates

@Action
public final void showTemplates()
Näitab/peidab templaatide vaate


showConsole

@Action
public final void showConsole()
Näitab/peidab kompilaatori väljundi


showHelp

@Action
public final void showHelp()
Avab programmi kasutusjuhendi


resetSettings

@Action
public final void resetSettings()
Taastab programi esialgsed seaded


runNxc

@Action
public void runNxc()
            throws java.io.IOException
Kompileerib aktiivse faili

Throws:
java.io.IOException

initComponents

private void initComponents()
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.


showExample

private void showExample(java.awt.event.MouseEvent evt)
Kuvab templaadi kirjelduse

Parameters:
evt -

saveConfirmation

public boolean saveConfirmation()
                         throws java.io.IOException
Salvestamise kinnitus

Returns:
boolean
Throws:
java.io.IOException