|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Window | +--java.awt.Frame | +--javax.swing.JFrame | +--gui.DerivationFrame
Okno pro provadeni derivace. Umoznuje aplikovat pravidla, vracet se v derivaci zpet, prejit na editaci gramatiky. Navic je mozne derivaci nechat probihat automaticky. Na programovanou gramatiku je vazana jen tim, ze pro editaci gramatiky vola PrgGramInputFrame. Pro dalsi typy gramatik by se musela pred editaci dodat volba typu.
Inner classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
Inner classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
Field Summary | |
protected static int |
ABOUT_ITEM
Pozice nazvu polozky menu napoveda o programu |
protected Production[] |
acUsableProds
Pravidla pouzitelna ve smyslu testovani vyskytu na aktualni vetnou formu |
protected javax.swing.JTextField |
appearField
Textove pole, do nehoz se pise vyskyt leve strany pravidla, ktery ma byt prepsan. |
protected javax.swing.JLabel |
appearLabel
Popisek k appearField |
protected javax.swing.JPanel |
appearPanel
Panel pro appearField a appearLabel |
protected GrammarSimulator |
applet
Pokud program bezi jako applet, je nastaven objekt tohoto appletu. |
protected static int |
APPLY_ITEM
Pozice nazvu polozky menu aplikuj pravidlo |
protected javax.swing.JButton |
applyButton
Tlacitko pro aplikaci pravidla a zacatek i konec automatice derivace |
protected javax.swing.JCheckBox |
autoCHBox
Zaskrtavaci tlacitko pro vyber automaticke derivace |
protected static int |
BACK_ITEM
Pozice nazvu polozky menu zpet o krok v derivaci |
protected javax.swing.JButton |
backButton
Tlacitko pro navrat v derivaci |
protected javax.swing.JPanel |
buttonPanel
Panel pro vsechna tlacitka |
protected java.awt.GridLayout |
buttonsLayout
Layout pro panel s tlacitky |
protected int |
delay
Cas v milisekundach mezi kroky pri automaticke derivaci |
protected javax.swing.JTextField |
delayField
Textove pole se zpozdenim mezi kroky derivace |
protected javax.swing.JLabel |
delayLabel
Popisek k delayField |
protected javax.swing.JPanel |
delayPanel
Panel pro delayField a delayLabel |
protected static int |
DER_ITEM
Pozice nazvu polozky menu napoveda o derivaci |
protected Derivation |
derivation
Aktualni derivace |
protected static int |
DERIVATION_MENU
Pozice nazvu menu derivace |
protected java.io.File |
directory
Adresar, ze ktereho byl naposledy vybran soubor pro ukladani nebo cteni |
protected static int |
END_ITEM
Pozice nazvu polozky menu konec programu |
protected javax.swing.JTextField |
formField
Textove pole pro vetnou formu |
protected javax.swing.JLabel |
formLabel
Popisek k formField |
protected javax.swing.JScrollPane |
formScroll
Posuvna lista pro vetnou formu |
protected Grammar |
grammar
Gramatika, podle ktere se provadi derivace |
protected static int |
GRAMMAR_MENU
Pozice nazvu menu gramatiky |
protected javax.swing.JButton |
gramNewButton
Tlacitko pro editaci nove gramatiky |
protected javax.swing.JButton |
gramUpdateButton
Tlacitko pro editaci gramatiky |
protected static int |
HELP_MENU
Pozice nazvu menu napovedy |
protected HelpFrame |
hf
Okno napovedy |
protected static int |
CHANGE_ITEM
Pozice nazvu polozky menu upravit gramatiku |
protected java.awt.GridLayout |
chBoxLayout
Layout pro panel se zaskrtavacimi tlacitky |
protected javax.swing.JPanel |
chBoxPanel
Panel pro zaskrtavaci tlacitka |
protected PrgGramInputFrame |
inputFrame
Okno pro editaci gramatiky |
protected javax.swing.JCheckBox |
leftCHBox
Zaskrtavaci tlacitko pro vyber leftmost derivace |
protected static int |
LOAD_ITEM
Pozice nazvu polozky menu nacist soubor |
protected javax.swing.JMenuItem[][] |
menuItems
Polozky menu |
protected static java.lang.String[][] |
menuItemsStrings
Retezce nazvu polozek v menu |
protected static java.lang.String[] |
menuStrings
Retezce nazvu menu |
protected static int |
NEW_ITEM
Pozice nazvu polozky menu nova derivace |
protected javax.swing.JButton |
newButton
Tlacitko pro novou derivaci |
protected javax.swing.JLabel |
prodLabel
Popisek k prodsBox |
protected javax.swing.JComboBox |
prodsBox
Vyber pravidla pro aplikaci |
protected javax.swing.JCheckBox |
randomCHBox
Zaskrtavaci tlacitko pro umozneni vyberu nahodneho pravidla |
protected static int |
SAVE_ITEM
Pozice nazvu polozky menu ulozit gramatiku do souboru |
protected javax.swing.JList |
stepsList
Seznam kroku derivace |
protected javax.swing.JScrollPane |
stepsScroll
Posuvne listy pro seznam kroku derivace |
protected boolean |
stopped
Nastaveno na true, jestli ma byt prerusena automaticka derivace |
protected java.lang.Thread |
thread
Vlakno, ktere vola po urcenem case funkci pro dalsi krok automaticke derivace |
protected Production[] |
usableProds
Pravidla pouzitelna klasickym zpusobem na aktualni vetnou formu |
static int |
WINDOW_HEIGHT
Vyska okna |
static int |
WINDOW_WIDTH
Sirka okna |
Fields inherited from class javax.swing.JFrame |
accessibleContext, defaultCloseOperation, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
base, CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, frameSerializedDataVersion, HAND_CURSOR, icon, ICONIFIED, mbManagement, menuBar, MOVE_CURSOR, N_RESIZE_CURSOR, nameCounter, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, serialVersionUID, state, SW_RESIZE_CURSOR, TEXT_CURSOR, title, W_RESIZE_CURSOR, WAIT_CURSOR, weakThis |
Fields inherited from class java.awt.Window |
active, dbg, focusMgr, inputContext, inputContextLock, OPENED, ownedWindowList, showWithParent, warningString, windowListener, windowSerializedDataVersion |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads |
Fields inherited from class java.awt.Component |
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, changeSupport, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y |
Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
DerivationFrame()
Vytvori okno se vsemi prvky. |
|
DerivationFrame(GrammarSimulator ap)
Vytvori okno se vsemi prvky. |
Method Summary | |
(package private) void |
applyButtonAction()
Akce pro tlacitko aplikuj. |
private void |
autoDerivate()
Pokud nebyla automaticka derivace prerusena provede jeji dalsi krok. |
private void |
autoCHBoxStateChanged()
Akce provedena pri zmene stavu tlacitka pro automatickou derivaci. |
private void |
backButtonAction()
Akce provedena pri stisku tlacitka zpet. |
java.io.File |
getDirectory()
Slouzi k ziskani adresare, ve kterem byl naposledy vybran soubor |
private void |
gramLoadButtonAction()
Akce pri volbe nacist gramatiku v menu. |
private void |
gramNewButtonAction()
Akce tlacitka nova gramatika. |
(package private) void |
gramUpdateButtonAction()
Akce tlacitka upravit gramatiku. |
boolean |
isApplet()
Slouzi ke zjisteni, jestli je okno soucast appletu nebo aplikace |
private void |
leftCHBoxStateChanged()
Akce provadena pri zmene zaskrtnuti leftmost derivace. |
private void |
makeFrame()
Vytvori v okne vsechny prvky a nastavi posluchace udalosti. |
private void |
makeMenu()
Vytvori vechna menu vcetne polozek v nich. |
private void |
newButtonAction()
Vytvori novou derivaci. |
private void |
setAlarm()
Vytvori nove vlakno, ktere pocka cas zadany v poli zpozdeni a potom vola metodu autoDerivate(). |
(package private) void |
setAutoConf()
Pri automaticke derivaci je mozne stisknout jen tlacitko stop, ktere derivaci zastavi. |
void |
setDirectory(java.io.File f)
Slouzi k nastaveni adresare, ve kterem byl naposledy vybran soubor |
void |
setGrammar(Grammar g)
Slouzi ke zmene gramatiky, podle ktere se derivace provadi. |
private void |
setProds()
Nastavi aplikovatelna pravidla do seznamu, ze ktereho se vybiraji. |
private void |
setSteps()
Nastavi seznam kroku derivace, aplikovatelna pravidla a pri prvnim kroku zakaze pouziti tlacitka zpet. |
(package private) void |
stopButtonAction()
Akce tlacitka stop. |
void |
takeControl(int message)
Slouzi k navratu z chyboveho okna. |
(package private) void |
unsetAutoConf()
Po skonceni automaticke derivace povoli zpet prvky rozhrani a zmeni tlacitko stop na aplikuj. |
protected void |
writeFile()
Slouzi k ulozeni gramatiky, podle ktere probiha derivace, do souboru. |
Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, createRootPaneException, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
|
Methods inherited from class java.awt.Window |
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, setWarningString, show, toBack, toFront, transferFocus |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyOrientation, countComponents, createHierarchyEvents, createChildHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, checkGD, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paint, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, removeAll, removeContainerListener, setFont, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, checkImage, checkImage, checkWindowClosingException, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
public static final int WINDOW_HEIGHT
public static final int WINDOW_WIDTH
protected static final java.lang.String[] menuStrings
protected static final java.lang.String[][] menuItemsStrings
protected static final int DERIVATION_MENU
protected static final int NEW_ITEM
protected static final int APPLY_ITEM
protected static final int BACK_ITEM
protected static final int END_ITEM
protected static final int GRAMMAR_MENU
protected static final int LOAD_ITEM
protected static final int CHANGE_ITEM
protected static final int SAVE_ITEM
protected static final int HELP_MENU
protected static final int DER_ITEM
protected static final int ABOUT_ITEM
protected HelpFrame hf
protected Grammar grammar
protected PrgGramInputFrame inputFrame
protected Derivation derivation
protected Production[] usableProds
protected Production[] acUsableProds
protected int delay
protected boolean stopped
protected GrammarSimulator applet
protected java.lang.Thread thread
protected java.io.File directory
protected javax.swing.JScrollPane formScroll
protected javax.swing.JTextField formField
protected javax.swing.JScrollPane stepsScroll
protected javax.swing.JList stepsList
protected javax.swing.JButton backButton
protected javax.swing.JButton gramUpdateButton
protected javax.swing.JButton newButton
protected javax.swing.JButton applyButton
protected javax.swing.JButton gramNewButton
protected javax.swing.JComboBox prodsBox
protected javax.swing.JCheckBox leftCHBox
protected javax.swing.JCheckBox autoCHBox
protected javax.swing.JCheckBox randomCHBox
protected javax.swing.JTextField appearField
protected javax.swing.JLabel appearLabel
protected javax.swing.JTextField delayField
protected javax.swing.JLabel delayLabel
protected javax.swing.JPanel buttonPanel
protected javax.swing.JPanel delayPanel
protected javax.swing.JPanel chBoxPanel
protected javax.swing.JPanel appearPanel
protected java.awt.GridLayout buttonsLayout
protected java.awt.GridLayout chBoxLayout
protected javax.swing.JLabel formLabel
protected javax.swing.JLabel prodLabel
protected javax.swing.JMenuItem[][] menuItems
Constructor Detail |
public DerivationFrame()
public DerivationFrame(GrammarSimulator ap)
Method Detail |
public void setDirectory(java.io.File f)
f
- Naposledy pouzity adresarpublic java.io.File getDirectory()
public boolean isApplet()
public void setGrammar(Grammar g)
g
- Nova gramatikaprivate void setProds()
private void setSteps()
public void takeControl(int message)
takeControl
in interface Errorable
message
- Cislo chyboveho hlaseni, ktere bylo zobrazeno.private void makeFrame()
private void backButtonAction()
private void newButtonAction()
private void gramNewButtonAction()
private void gramLoadButtonAction()
void applyButtonAction()
void gramUpdateButtonAction()
void stopButtonAction()
private void leftCHBoxStateChanged()
private void autoCHBoxStateChanged()
private void makeMenu()
private void setAlarm()
private void autoDerivate()
void setAutoConf()
void unsetAutoConf()
protected void writeFile()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |