mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
renamed utility functions for clarity
This commit is contained in:
parent
32cb438e7c
commit
42b539c41f
3 changed files with 9 additions and 8 deletions
|
@ -154,6 +154,7 @@ public class TableWaitingDialog extends MageDialog {
|
|||
public void showDialog(UUID roomId, UUID tableId, boolean isTournament) {
|
||||
Rectangle currentBounds = MageFrame.getDesktop().getBounds();
|
||||
Optional<UUID> chatId = SessionHandler.getTableChatId(tableId);
|
||||
String tournamentChatDivider = PreferencesDialog.getCachedValue(KEY_TABLES_DIVIDER_LOCATION_4, null);
|
||||
updateTask = new UpdateSeatsTask(SessionHandler.getSession(), roomId, tableId, this);
|
||||
|
||||
this.roomId = roomId;
|
||||
|
@ -176,7 +177,7 @@ public class TableWaitingDialog extends MageDialog {
|
|||
this.setModal(false);
|
||||
this.setLocation(100, 100);
|
||||
this.setVisible(true);
|
||||
String tournamentChatDivider = PreferencesDialog.getCachedValue(KEY_TABLES_DIVIDER_LOCATION_4, null);
|
||||
|
||||
GuiDisplayUtil.restoreDividerLocations(currentBounds, tournamentChatDivider, jSplitPane1);
|
||||
} else {
|
||||
closeDialog();
|
||||
|
@ -193,7 +194,7 @@ public class TableWaitingDialog extends MageDialog {
|
|||
this.removeDialog();
|
||||
TableUtil.saveColumnWidthAndOrderToPrefs(jTableSeats, KEY_TABLE_WAITING_COLUMNS_WIDTH, KEY_TABLE_WAITING_COLUMNS_ORDER);
|
||||
GuiDisplayUtil.saveCurrentBoundsToPrefs();
|
||||
GuiDisplayUtil.setDividerLocation(KEY_TABLES_DIVIDER_LOCATION_4, this.jSplitPane1.getDividerLocation());
|
||||
GuiDisplayUtil.saveDividerLocationToPrefs(KEY_TABLES_DIVIDER_LOCATION_4, this.jSplitPane1.getDividerLocation());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -231,7 +231,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
jScrollPaneTablesActive.getViewport().setBackground(new Color(255, 255, 255, 50));
|
||||
jScrollPaneTablesFinished.getViewport().setBackground(new Color(255, 255, 255, 50));
|
||||
|
||||
saveActiveFiltersToPrefs();
|
||||
restoreFilters();
|
||||
setGUISize();
|
||||
|
||||
Action openTableAction;
|
||||
|
@ -411,12 +411,12 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
private void saveDividerLocations() {
|
||||
// save divider locations and divider saveDividerLocations
|
||||
GuiDisplayUtil.saveCurrentBoundsToPrefs();
|
||||
GuiDisplayUtil.setDividerLocation(KEY_TABLES_DIVIDER_LOCATION_1, this.jSplitPane1.getDividerLocation());
|
||||
GuiDisplayUtil.setDividerLocation(KEY_TABLES_DIVIDER_LOCATION_2, this.jSplitPaneTables.getDividerLocation());
|
||||
GuiDisplayUtil.setDividerLocation(KEY_TABLES_DIVIDER_LOCATION_3, chatPanelMain.getSplitDividerLocation());
|
||||
GuiDisplayUtil.saveDividerLocationToPrefs(KEY_TABLES_DIVIDER_LOCATION_1, this.jSplitPane1.getDividerLocation());
|
||||
GuiDisplayUtil.saveDividerLocationToPrefs(KEY_TABLES_DIVIDER_LOCATION_2, this.jSplitPaneTables.getDividerLocation());
|
||||
GuiDisplayUtil.saveDividerLocationToPrefs(KEY_TABLES_DIVIDER_LOCATION_3, chatPanelMain.getSplitDividerLocation());
|
||||
}
|
||||
|
||||
private void saveActiveFiltersToPrefs() {
|
||||
private void restoreFilters() {
|
||||
TableUtil.setActiveFilters(KEY_TABLES_FILTER_SETTINGS, filterButtons);
|
||||
setTableFilter();
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public final class GuiDisplayUtil {
|
|||
PreferencesDialog.saveValue(KEY_MAGE_PANEL_LAST_SIZE, currentBounds);
|
||||
}
|
||||
|
||||
public static void setDividerLocation(String dividerPrefKey, int position) {
|
||||
public static void saveDividerLocationToPrefs(String dividerPrefKey, int position) {
|
||||
PreferencesDialog.saveValue(dividerPrefKey, Integer.toString(position));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue