Package wprover
Class ConcDialog
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Dialog
-
- javax.swing.JDialog
-
- wprover.JBaseDialog
-
- wprover.ConcDialog
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.awt.event.ContainerListener,java.awt.event.ItemListener,java.awt.event.KeyListener,java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,java.util.EventListener,javax.accessibility.Accessible,javax.swing.RootPaneContainer,javax.swing.WindowConstants
public class ConcDialog extends JBaseDialog implements java.awt.event.ActionListener, java.awt.event.ItemListener
ConcDialog is a dialog for selecting geometric conclusions. It allows the user to select points and check geometric properties.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
-
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description static intCONCLUSION_CANCELstatic intCONCLUSION_OK-
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description ConcDialog(GExpert gx, java.lang.String title)Constructs a ConcDialog with the specified GExpert instance and title.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)Handles action events for the buttons.voidchangeBOKListener(java.awt.event.ActionListener ls)Changes the action listener for the OK button.booleancheckValid()Checks if the selected item is valid.booleancheckValid(int id)Checks if the selected item with the given ID is valid.ConsgetProve()Returns the conclusion based on the selected points and type.voiditemStateChanged(java.awt.event.ItemEvent e)Handles item state changes for the combo boxes.voidselectAPoint(CPoint p)Selects a point in the combo boxes.voidsetCns(Cons c)Sets the conclusion in the dialog.voidsetPoints(java.util.Vector v)Sets the points in the combo boxes.voidsetRatioVisible()Sets the ratio values in the combo boxes.voidsetSAngle()Sets the angles in the combo box for special angles.voidsetType(int t)Sets the type of the dialog.intshowDialog(java.lang.String s)Displays the dialog and returns the result.-
Methods inherited from class wprover.JBaseDialog
componentAdded, componentRemoved, keyPressed, keyReleased, keyTyped
-
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBack
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, 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, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
CONCLUSION_OK
public static final int CONCLUSION_OK
- See Also:
- Constant Field Values
-
CONCLUSION_CANCEL
public static final int CONCLUSION_CANCEL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConcDialog
public ConcDialog(GExpert gx, java.lang.String title)
Constructs a ConcDialog with the specified GExpert instance and title.- Parameters:
gx- the GExpert instancetitle- the title of the dialog
-
-
Method Detail
-
setType
public void setType(int t)
Sets the type of the dialog.- Parameters:
t- the type to set
-
changeBOKListener
public void changeBOKListener(java.awt.event.ActionListener ls)
Changes the action listener for the OK button.- Parameters:
ls- the new ActionListener to set
-
setCns
public void setCns(Cons c)
Sets the conclusion in the dialog.- Parameters:
c- the conclusion to set
-
setPoints
public void setPoints(java.util.Vector v)
Sets the points in the combo boxes.- Parameters:
v- the vector of points to set
-
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent e)
Handles item state changes for the combo boxes.- Specified by:
itemStateChangedin interfacejava.awt.event.ItemListener- Parameters:
e- the ItemEvent triggered by the user
-
selectAPoint
public void selectAPoint(CPoint p)
Selects a point in the combo boxes.- Parameters:
p- the point to select
-
setSAngle
public void setSAngle()
Sets the angles in the combo box for special angles.
-
setRatioVisible
public void setRatioVisible()
Sets the ratio values in the combo boxes.
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Handles action events for the buttons.- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Parameters:
e- the ActionEvent triggered by the user
-
showDialog
public int showDialog(java.lang.String s)
Displays the dialog and returns the result.- Parameters:
s- the string to select in the combo box- Returns:
- the return value indicating the result of the dialog
-
checkValid
public boolean checkValid()
Checks if the selected item is valid.- Returns:
- true if the selected item is valid, false otherwise
-
checkValid
public boolean checkValid(int id)
Checks if the selected item with the given ID is valid.- Parameters:
id- the ID of the selected item- Returns:
- true if the selected item is valid, false otherwise
-
getProve
public Cons getProve()
Returns the conclusion based on the selected points and type.- Returns:
- the conclusion object
-
-