Package org.unitConverter.converterGUI
Class UnitConverterGUI.View
- java.lang.Object
-
- org.unitConverter.converterGUI.UnitConverterGUI.View
-
- Enclosing class:
- UnitConverterGUI
private static class UnitConverterGUI.View extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JTextArea
dimensionBasedOutput
The output area in the dimension-based converterprivate javax.swing.JFrame
frame
The view's frame.private javax.swing.JTextField
fromEntry
The "From" entry in the conversion panelprivate SearchBoxList
fromSearch
The panel for "From" in the dimension-based converterprivate javax.swing.JTextArea
output
The output area in the conversion panelprivate SearchBoxList
prefixNameList
The searchable list of prefix names in the prefix viewerprivate javax.swing.JTextArea
prefixTextBox
The text box for prefix data in the prefix viewerprivate UnitConverterGUI.Presenter
presenter
The view's associated presenter.private javax.swing.JTextField
toEntry
The "To" entry in the conversion panelprivate SearchBoxList
toSearch
The panel for "To" in the dimension-based converterprivate SearchBoxList
unitNameList
The searchable list of unit names in the unit viewerprivate javax.swing.JTextArea
unitTextBox
The text box for unit data in the unit viewerprivate javax.swing.JTextField
valueInput
The panel for inputting values in the dimension-based converter
-
Constructor Summary
Constructors Constructor Description View()
Creates theView
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDimensionConverterInput()
java.lang.String
getFromSelection()
java.lang.String
getFromText()
java.lang.String
getPrefixViewerSelection()
java.lang.String
getToSelection()
java.lang.String
getToText()
java.lang.String
getUnitViewerSelection()
void
init()
Starts up the application.private void
initComponents()
Initializes the view's components.void
setDimensionConverterOutputText(java.lang.String text)
Sets the text in the output of the dimension-based converter.void
setExpressionConverterOutputText(java.lang.String text)
Sets the text in the output of the conversion panel.void
setPrefixTextBoxText(java.lang.String text)
Sets the text of the prefix text box in the prefix viewer.void
setUnitTextBoxText(java.lang.String text)
Sets the text of the unit text box in the unit viewer.void
showErrorDialog(java.lang.String title, java.lang.String message)
Shows an error dialog.
-
-
-
Field Detail
-
frame
private final javax.swing.JFrame frame
The view's frame.
-
presenter
private final UnitConverterGUI.Presenter presenter
The view's associated presenter.
-
valueInput
private final javax.swing.JTextField valueInput
The panel for inputting values in the dimension-based converter
-
fromSearch
private final SearchBoxList fromSearch
The panel for "From" in the dimension-based converter
-
toSearch
private final SearchBoxList toSearch
The panel for "To" in the dimension-based converter
-
dimensionBasedOutput
private final javax.swing.JTextArea dimensionBasedOutput
The output area in the dimension-based converter
-
fromEntry
private final javax.swing.JTextField fromEntry
The "From" entry in the conversion panel
-
toEntry
private final javax.swing.JTextField toEntry
The "To" entry in the conversion panel
-
output
private final javax.swing.JTextArea output
The output area in the conversion panel
-
unitNameList
private final SearchBoxList unitNameList
The searchable list of unit names in the unit viewer
-
prefixNameList
private final SearchBoxList prefixNameList
The searchable list of prefix names in the prefix viewer
-
unitTextBox
private final javax.swing.JTextArea unitTextBox
The text box for unit data in the unit viewer
-
prefixTextBox
private final javax.swing.JTextArea prefixTextBox
The text box for prefix data in the prefix viewer
-
-
Method Detail
-
getDimensionConverterInput
public java.lang.String getDimensionConverterInput()
- Returns:
- value in dimension-based converter
- Since:
- 2019-04-13, v0.2.0
-
getFromSelection
public java.lang.String getFromSelection()
- Returns:
- selection in "From" selector in dimension-based converter
- Since:
- 2019-04-13, v0.2.0
-
getFromText
public java.lang.String getFromText()
- Returns:
- text in "From" box in converter panel
- Since:
- 2019-01-15, v0.1.0
-
getPrefixViewerSelection
public java.lang.String getPrefixViewerSelection()
- Returns:
- index of selected prefix in prefix viewer
- Since:
- 2019-01-15, v0.1.0
-
getToSelection
public java.lang.String getToSelection()
- Returns:
- selection in "To" selector in dimension-based converter
- Since:
- 2019-04-13, v0.2.0
-
getToText
public java.lang.String getToText()
- Returns:
- text in "To" box in converter panel
- Since:
- 2019-01-26, v0.1.0
-
getUnitViewerSelection
public java.lang.String getUnitViewerSelection()
- Returns:
- index of selected unit in unit viewer
- Since:
- 2019-01-15, v0.1.0
-
init
public final void init()
Starts up the application.- Since:
- 2018-12-27, v0.1.0
-
initComponents
private final void initComponents()
Initializes the view's components.- Since:
- 2018-12-27, v0.1.0
-
setDimensionConverterOutputText
public void setDimensionConverterOutputText(java.lang.String text)
Sets the text in the output of the dimension-based converter.- Parameters:
text
- text to set- Since:
- 2019-04-13, v0.2.0
-
setExpressionConverterOutputText
public void setExpressionConverterOutputText(java.lang.String text)
Sets the text in the output of the conversion panel.- Parameters:
text
- text to set- Since:
- 2019-01-15, v0.1.0
-
setPrefixTextBoxText
public void setPrefixTextBoxText(java.lang.String text)
Sets the text of the prefix text box in the prefix viewer.- Parameters:
text
- text to set- Since:
- 2019-01-15, v0.1.0
-
setUnitTextBoxText
public void setUnitTextBoxText(java.lang.String text)
Sets the text of the unit text box in the unit viewer.- Parameters:
text
- text to set- Since:
- 2019-01-15, v0.1.0
-
showErrorDialog
public void showErrorDialog(java.lang.String title, java.lang.String message)
Shows an error dialog.- Parameters:
title
- title of dialogmessage
- message in dialog- Since:
- 2019-01-14, v0.1.0
-
-