edu.cs.ai.kreator.ui.gui
Class GraphicalUserInterface

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by edu.cs.ai.kreator.ui.gui.GraphicalUserInterface
All Implemented Interfaces:
KreatorFileListener, StainedListener, KreatorUserInterface, java.awt.event.FocusListener, java.awt.event.MouseListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class GraphicalUserInterface
extends javax.swing.JFrame
implements KreatorUserInterface, java.awt.event.WindowListener, java.awt.event.MouseListener, StainedListener, javax.swing.event.ChangeListener, KreatorFileListener, java.awt.event.FocusListener

Author:
Niklas Wulf, Sebastian Loh, Marc Finthammer, Matthias Thimm A JFrame that contains all other GUI elements
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static org.apache.log4j.Logger LOG
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface edu.cs.ai.kreator.ui.KreatorUserInterface
APPROVE_OPTION, CANCEL_OPTION, CONSOLE_FONT, NO_OPTION, OK_OPTION, YES_OPTION
 
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
GraphicalUserInterface()
          Default constructor.
 
Method Summary
static void addComponent(java.awt.Container cont, java.awt.GridBagLayout gbl, java.awt.Component c, int x, int y, int width, int height, double weightx, double weighty)
           
 void cleanStainedStatus(DataFile dataFile)
          Resets the DataFile's stained status.
 void closeFile(DataFile file)
          Closes the DataFile's representation in the user interface.
 void closeProject()
          Closes the currently opened project in the user interface
 void copy()
          Copies text from the currently active text component.
 void cut()
          Cuts text from the currently active text component.
 void doRedo()
          Redoes the last reverted action in the currently active text component.
 void doUndo()
          Reverts the last action in the currently active text component.
 void find()
          Shows a quick find dialog for the currently active text component.
 void findAndReplace()
          Shows a find-and-replace dialog for the currently active text component.
 void findNext()
          Continues a search in the currently active text component.
 void focusGained(java.awt.event.FocusEvent e)
           
 void focusLost(java.awt.event.FocusEvent e)
           
 KreatorConsole getConsole()
          Returns the currently selected console.
 ConsoleTabbedPane getConsoleTabbedPane()
          Returns the GUI's ConsoleTabbedPane.
 DataFile getCurrentOpenFile()
          Returns the currently opened DataFile or null if no file is open.
 java.util.List<DataFile> getCurrentOpenFiles()
          Returns a list of the currently opened DataFiles.
 KreatorConsole getDefaultConsole()
          Returns the default (always present) console.
 KreatorFileChooser getFileChooser()
          Creates a KreatorFileChooser.
 java.lang.String getFileContent(DataFile kfile)
          Returns the editor content of a given DataFile or "" if the file is not opened in the user interface.
 javax.swing.JTextPane getLoggingTextPane()
          Returns the logger's TextPane.
 DataFile getSelectedFileFromTree()
          Returns the DataFile which is currently selected in the project container or null if no file is selected.
 javax.swing.JTextArea getSystemTextArea()
          Returns the loggingArea where System.in and/or System.err are redirected.
 void init()
          Initializes the user interface.
 boolean isOpen(DataFile file)
          Returns true if the given DataFile is currently opened.
 void modelChanged(KreatorFileEvent e)
          The Model has changed and the view needs to be updated KreatorFileEvent carries the KreatorFile as the source which had changed.
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void openFile(DataFile file)
          Opens a given DataFile in the user interface (e.g. as a new tab).
 void openProject(Project project)
          Opens the given project in the GUI.
 void packAndShow()
          Shows the GUI
 void paste()
          Pastes text into the currently active text component.
 void providePopupMenuStatusTexts(java.awt.event.MouseEvent e, javax.swing.text.JTextComponent text)
          Provides a popup menu for the fields console, report, logging, and system output with actions clear and save.
 void setProgress(int progress)
          Shows the user some progress indicator.
 void setStatusText(java.lang.String text)
          Show the user some status text.
 void showAboutDialog()
          Shows an about dialog.
 void showErrorDialog(java.lang.String text, java.lang.String title)
          Shows a simple error dialog.
 void showGenerateDataDialog(KnowledgebaseFile kfile)
          Shows a generate data dialog for the given knowledge base.
 void showInfoPane(java.lang.String text)
          Shows a simple dialog with an okay button
 java.lang.String showInputDialog(java.lang.String text, java.lang.String value)
          Shows an input dialog.
 void showLaTeXWindow(java.lang.String text, java.lang.String fileName)
          Shows a simple text message with a close button.
 void showLearnDialog(SampleCollection sfile)
          Shows a learning dialog for the given sample collection.
 void showPreferences()
          Shows KReator's preferences dialog.
 void showQueryDialog(KnowledgebaseFile kfile)
          Shows a query dialog for the given knowledge base.
 int showYesNoCancelOptionPane(java.lang.String text, java.lang.String title)
          Shows a dialog with a yes, no and cancel option.
 int showYesNoOptionPane(java.lang.String text, java.lang.String title)
          Shows a dialog with a yes and no option.
 int[] showYesNoOptionPane(java.lang.String text, java.lang.String title, java.lang.String checkBoxText)
          Shows a dialog with a yes and no option and a check box
 void shutDown()
          Shuts down the GUI.
 void stainedStatusChanged(boolean stained)
          This method is called by a Stainable in order to indicate that its stained/clean state has changed.
 void stateChanged(javax.swing.event.ChangeEvent e)
           
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
           
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent e)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

LOG

public static final org.apache.log4j.Logger LOG
Constructor Detail

GraphicalUserInterface

public GraphicalUserInterface()
Default constructor. Initializes nothing. Use init().

Method Detail

init

public void init()
Description copied from interface: KreatorUserInterface
Initializes the user interface.

Specified by:
init in interface KreatorUserInterface

packAndShow

public void packAndShow()
Description copied from interface: KreatorUserInterface
Shows the GUI

Specified by:
packAndShow in interface KreatorUserInterface

shutDown

public void shutDown()
Description copied from interface: KreatorUserInterface
Shuts down the GUI. Simply destroys the GUI.
Everything necessary for KReator's shutdown is in KreatorMain#shutdown().

Specified by:
shutDown in interface KreatorUserInterface

openProject

public void openProject(Project project)
Description copied from interface: KreatorUserInterface
Opens the given project in the GUI.

Specified by:
openProject in interface KreatorUserInterface
Parameters:
project - The Project to open.

closeProject

public void closeProject()
Description copied from interface: KreatorUserInterface
Closes the currently opened project in the user interface

Specified by:
closeProject in interface KreatorUserInterface

getCurrentOpenFile

public DataFile getCurrentOpenFile()
Description copied from interface: KreatorUserInterface
Returns the currently opened DataFile or null if no file is open.

Specified by:
getCurrentOpenFile in interface KreatorUserInterface
Returns:
the currently opened DataFile or null if no file is open.

getSelectedFileFromTree

public DataFile getSelectedFileFromTree()
                                 throws DataFileNotGeneratedException
Description copied from interface: KreatorUserInterface
Returns the DataFile which is currently selected in the project container or null if no file is selected.

Specified by:
getSelectedFileFromTree in interface KreatorUserInterface
Returns:
the DataFile which is currently selected in the project container or null if no file is selected.
Throws:
DataFileNotGeneratedException

isOpen

public boolean isOpen(DataFile file)
Description copied from interface: KreatorUserInterface
Returns true if the given DataFile is currently opened.

Specified by:
isOpen in interface KreatorUserInterface
Parameters:
file - The file for which should be checked if it is currently opened.
Returns:
true if the given DataFile is currently opened.

getCurrentOpenFiles

public java.util.List<DataFile> getCurrentOpenFiles()
Description copied from interface: KreatorUserInterface
Returns a list of the currently opened DataFiles.

Specified by:
getCurrentOpenFiles in interface KreatorUserInterface
Returns:
a list of the currently opened DataFiles.

getFileContent

public java.lang.String getFileContent(DataFile kfile)
Description copied from interface: KreatorUserInterface
Returns the editor content of a given DataFile or "" if the file is not opened in the user interface.

Specified by:
getFileContent in interface KreatorUserInterface
Returns:
The editor content of a given DataFile or "" if the file is not opened in the user interface.

cleanStainedStatus

public void cleanStainedStatus(DataFile dataFile)
Description copied from interface: KreatorUserInterface
Resets the DataFile's stained status. (e.g. when it has been saved).

Specified by:
cleanStainedStatus in interface KreatorUserInterface

openFile

public void openFile(DataFile file)
Description copied from interface: KreatorUserInterface
Opens a given DataFile in the user interface (e.g. as a new tab).

Specified by:
openFile in interface KreatorUserInterface

closeFile

public void closeFile(DataFile file)
Description copied from interface: KreatorUserInterface
Closes the DataFile's representation in the user interface.

Specified by:
closeFile in interface KreatorUserInterface

getSystemTextArea

public javax.swing.JTextArea getSystemTextArea()
Description copied from interface: KreatorUserInterface
Returns the loggingArea where System.in and/or System.err are redirected.

Specified by:
getSystemTextArea in interface KreatorUserInterface
Returns:
the loggingArea where System.in and/or System.err are redirected.

getConsole

public KreatorConsole getConsole()
Description copied from interface: KreatorUserInterface
Returns the currently selected console.

Specified by:
getConsole in interface KreatorUserInterface
Returns:
the currently selected console.

getConsoleTabbedPane

public ConsoleTabbedPane getConsoleTabbedPane()
Description copied from interface: KreatorUserInterface
Returns the GUI's ConsoleTabbedPane.

Specified by:
getConsoleTabbedPane in interface KreatorUserInterface
Returns:
the GUI's ConsoleTabbedPane.

getLoggingTextPane

public javax.swing.JTextPane getLoggingTextPane()
Description copied from interface: KreatorUserInterface
Returns the logger's TextPane.

Specified by:
getLoggingTextPane in interface KreatorUserInterface
Returns:
the logger's TextPane.

getDefaultConsole

public KreatorConsole getDefaultConsole()
Description copied from interface: KreatorUserInterface
Returns the default (always present) console.

Specified by:
getDefaultConsole in interface KreatorUserInterface
Returns:
the default (always present) console.

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Specified by:
windowClosing in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Specified by:
windowIconified in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

providePopupMenuStatusTexts

public void providePopupMenuStatusTexts(java.awt.event.MouseEvent e,
                                        javax.swing.text.JTextComponent text)
Provides a popup menu for the fields console, report, logging, and system output with actions clear and save.

Parameters:
e - the mouse event that triggered the popup
text - the textpane that initiated the mouse event

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Specified by:
stateChanged in interface javax.swing.event.ChangeListener

stainedStatusChanged

public void stainedStatusChanged(boolean stained)
Description copied from interface: StainedListener
This method is called by a Stainable in order to indicate that its stained/clean state has changed.

Specified by:
stainedStatusChanged in interface StainedListener
Parameters:
stained - true if the state is "stained", false if it "clean"

modelChanged

public void modelChanged(KreatorFileEvent e)
Description copied from interface: KreatorFileListener
The Model has changed and the view needs to be updated KreatorFileEvent carries the KreatorFile as the source which had changed.

Specified by:
modelChanged in interface KreatorFileListener

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Specified by:
focusLost in interface java.awt.event.FocusListener

setProgress

public void setProgress(int progress)
Description copied from interface: KreatorUserInterface
Shows the user some progress indicator.

Specified by:
setProgress in interface KreatorUserInterface
Parameters:
progress - can be:
1-100: Show progress. 0: Show indeterminate progress. -1: Don't show any progress bar.

setStatusText

public void setStatusText(java.lang.String text)
Description copied from interface: KreatorUserInterface
Show the user some status text.

Specified by:
setStatusText in interface KreatorUserInterface

showYesNoCancelOptionPane

public int showYesNoCancelOptionPane(java.lang.String text,
                                     java.lang.String title)
Description copied from interface: KreatorUserInterface
Shows a dialog with a yes, no and cancel option.

Specified by:
showYesNoCancelOptionPane in interface KreatorUserInterface
Parameters:
text - The text in this dialog
title - The title of the dialog
Returns:
either KreatorUserInterface.YES_OPTION, KreatorUserInterface.NO_OPTION or KreatorUserInterface.CANCEL_OPTION

showYesNoOptionPane

public int showYesNoOptionPane(java.lang.String text,
                               java.lang.String title)
Description copied from interface: KreatorUserInterface
Shows a dialog with a yes and no option.

Specified by:
showYesNoOptionPane in interface KreatorUserInterface
Parameters:
text - The text in this dialog
title - The title of the dialog
Returns:
either KreatorUserInterface.YES_OPTION or KreatorUserInterface.NO_OPTION

showYesNoOptionPane

public int[] showYesNoOptionPane(java.lang.String text,
                                 java.lang.String title,
                                 java.lang.String checkBoxText)
Description copied from interface: KreatorUserInterface
Shows a dialog with a yes and no option and a check box

Specified by:
showYesNoOptionPane in interface KreatorUserInterface
Parameters:
text - The text in this dialog
title - The title of the dialog
checkBoxText - The text next to the check box
Returns:
An array with two values: The first element is either KreatorUserInterface.YES_OPTION or KreatorUserInterface.NO_OPTION depending on the button the user clicked The second element is either KreatorUserInterface.YES_OPTION, if the check box was checked or KreatorUserInterface.NO_OPTION, if the box was not checked

showInfoPane

public void showInfoPane(java.lang.String text)
Description copied from interface: KreatorUserInterface
Shows a simple dialog with an okay button

Specified by:
showInfoPane in interface KreatorUserInterface
Parameters:
text - The text of the dialog

showInputDialog

public java.lang.String showInputDialog(java.lang.String text,
                                        java.lang.String value)
Description copied from interface: KreatorUserInterface
Shows an input dialog.

Specified by:
showInputDialog in interface KreatorUserInterface
Parameters:
text - The text next to the input text field.
value - The text inside the input text field.
Returns:
the text inside the input text field when the user confirms the dialog

getFileChooser

public KreatorFileChooser getFileChooser()
Description copied from interface: KreatorUserInterface
Creates a KreatorFileChooser. You can set the dialog's options before showing it.

Specified by:
getFileChooser in interface KreatorUserInterface
Returns:

showErrorDialog

public void showErrorDialog(java.lang.String text,
                            java.lang.String title)
Description copied from interface: KreatorUserInterface
Shows a simple error dialog.

Specified by:
showErrorDialog in interface KreatorUserInterface
Parameters:
text - The text of the dialog.
title - The title of the dialog

showQueryDialog

public void showQueryDialog(KnowledgebaseFile kfile)
Description copied from interface: KreatorUserInterface
Shows a query dialog for the given knowledge base.

Specified by:
showQueryDialog in interface KreatorUserInterface
Parameters:
kfile - The knowledge base to be queried.

showLearnDialog

public void showLearnDialog(SampleCollection sfile)
Description copied from interface: KreatorUserInterface
Shows a learning dialog for the given sample collection.

Specified by:
showLearnDialog in interface KreatorUserInterface
Parameters:
sfile - The sample collection to learn from.

showPreferences

public void showPreferences()
Description copied from interface: KreatorUserInterface
Shows KReator's preferences dialog.

Specified by:
showPreferences in interface KreatorUserInterface

showAboutDialog

public void showAboutDialog()
Description copied from interface: KreatorUserInterface
Shows an about dialog.

Specified by:
showAboutDialog in interface KreatorUserInterface

showLaTeXWindow

public void showLaTeXWindow(java.lang.String text,
                            java.lang.String fileName)
Description copied from interface: KreatorUserInterface
Shows a simple text message with a close button.

Specified by:
showLaTeXWindow in interface KreatorUserInterface
Parameters:
text - The text of the window.
fileName - The file name which will be exported to latex.

showGenerateDataDialog

public void showGenerateDataDialog(KnowledgebaseFile kfile)
Description copied from interface: KreatorUserInterface
Shows a generate data dialog for the given knowledge base.

Specified by:
showGenerateDataDialog in interface KreatorUserInterface
Parameters:
kfile - The knowledge base to generate data from.

copy

public void copy()
Description copied from interface: KreatorUserInterface
Copies text from the currently active text component. If no text component has focus this does nothing.

Specified by:
copy in interface KreatorUserInterface

cut

public void cut()
Description copied from interface: KreatorUserInterface
Cuts text from the currently active text component. If no text component has focus or the text component is not editable this does nothing.

Specified by:
cut in interface KreatorUserInterface

paste

public void paste()
Description copied from interface: KreatorUserInterface
Pastes text into the currently active text component. If no text component has focus or the text component is not editable this does nothing.

Specified by:
paste in interface KreatorUserInterface

doRedo

public void doRedo()
Description copied from interface: KreatorUserInterface
Redoes the last reverted action in the currently active text component. If no text component has focus or the text component is not editable this does nothing.

Specified by:
doRedo in interface KreatorUserInterface

doUndo

public void doUndo()
Description copied from interface: KreatorUserInterface
Reverts the last action in the currently active text component. If no text component has focus or the text component is not editable this does nothing.

Specified by:
doUndo in interface KreatorUserInterface

find

public void find()
Description copied from interface: KreatorUserInterface
Shows a quick find dialog for the currently active text component. If no text component has focus this does nothing.

Specified by:
find in interface KreatorUserInterface

findNext

public void findNext()
Description copied from interface: KreatorUserInterface
Continues a search in the currently active text component. If no text component has focus or there is no ongoing search this does nothing.

Specified by:
findNext in interface KreatorUserInterface

findAndReplace

public void findAndReplace()
Description copied from interface: KreatorUserInterface
Shows a find-and-replace dialog for the currently active text component. If no text component has focus this does nothing.

Specified by:
findAndReplace in interface KreatorUserInterface

addComponent

public static void addComponent(java.awt.Container cont,
                                java.awt.GridBagLayout gbl,
                                java.awt.Component c,
                                int x,
                                int y,
                                int width,
                                int height,
                                double weightx,
                                double weighty)