Class ColumnsDefaultGUI
- java.lang.Object
-
- io.github.oliviercailloux.j_voting.profiles.gui.ProfileDefaultGUI
-
- io.github.oliviercailloux.j_voting.profiles.gui.ColumnsDefaultGUI
-
- Direct Known Subclasses:
SOCColumnsGUI
,SOCWrappedColumnsGUI
,SOIColumnsGUI
,SOIWrappedColumnsGUI
public class ColumnsDefaultGUI extends ProfileDefaultGUI
Generalization of profile displaying GUIs
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.jface.viewers.ViewerCell
cellBeingDragged
protected int
destinationX
protected int
destinationY
protected static org.eclipse.swt.widgets.Button
saveButton
protected int
sourceX
protected int
sourceY
-
Fields inherited from class io.github.oliviercailloux.j_voting.profiles.gui.ProfileDefaultGUI
columnsButton, display, mainShell, newpref, profileBuilder, rowsButton, table, tableViewer, voterToModify, wrapButton
-
-
Constructor Summary
Constructors Constructor Description ColumnsDefaultGUI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
displayProfileWindow(String[] args)
Displays the window : the table containing the profile as well as the buttons.void
handleDragAndDrop()
Implements dragging and dropping a cell at a time within the same column.
When moving it up, the cell it is dropped on and those below will go down one cell.void
save(String outputFile)
Saves the changes to the file containing the profile.void
tableDisplay()
Displays the table containing the profile-
Methods inherited from class io.github.oliviercailloux.j_voting.profiles.gui.ProfileDefaultGUI
checkRadioButton, createColumns, displayRadioButtons, editStrictPreference, emptyTable, modif, populateRows
-
-
-
-
Field Detail
-
sourceX
protected int sourceX
-
sourceY
protected int sourceY
-
cellBeingDragged
protected org.eclipse.jface.viewers.ViewerCell cellBeingDragged
-
saveButton
protected static org.eclipse.swt.widgets.Button saveButton
-
destinationX
protected int destinationX
-
destinationY
protected int destinationY
-
-
Method Detail
-
displayProfileWindow
public void displayProfileWindow(String[] args) throws IOException
Displays the window : the table containing the profile as well as the buttons.- Overrides:
displayProfileWindow
in classProfileDefaultGUI
- Parameters:
args
- notnull
- Throws:
IOException
-
tableDisplay
public void tableDisplay()
Description copied from class:ProfileDefaultGUI
Displays the table containing the profile- Overrides:
tableDisplay
in classProfileDefaultGUI
-
handleDragAndDrop
public void handleDragAndDrop()
Implements dragging and dropping a cell at a time within the same column.
When moving it up, the cell it is dropped on and those below will go down one cell.
When moving it down, the cell it is dropped on and those above will go up one cell.
-
save
public void save(String outputFile)
Saves the changes to the file containing the profile.- Overrides:
save
in classProfileDefaultGUI
- Parameters:
outputFile
- notnull
-
-