|
Lines 148-153
Link Here
|
| 148 |
boolean menubarVisible=true; |
148 |
boolean menubarVisible=true; |
| 149 |
boolean toolbarVisible=true; |
149 |
boolean toolbarVisible=true; |
| 150 |
boolean leftToolbarVisible=true; |
150 |
boolean leftToolbarVisible=true; |
|
|
151 |
// Bendie: |
| 152 |
boolean statusbarVisible=true; |
| 153 |
// Bendie: |
| 154 |
boolean isFullscreen=false; |
| 151 |
|
155 |
|
| 152 |
public CloseAction close; |
156 |
public CloseAction close; |
| 153 |
public Action print; |
157 |
public Action print; |
|
Lines 176-189
Link Here
|
| 176 |
public Action navigationNextMap; |
180 |
public Action navigationNextMap; |
| 177 |
|
181 |
|
| 178 |
public Action moveToRoot; |
182 |
public Action moveToRoot; |
|
|
183 |
// Bendie: |
| 184 |
public Action moveToSelected; |
| 185 |
|
| 179 |
public Action toggleMenubar; |
186 |
public Action toggleMenubar; |
| 180 |
public Action toggleToolbar; |
187 |
public Action toggleToolbar; |
| 181 |
public Action toggleLeftToolbar; |
188 |
public Action toggleLeftToolbar; |
|
|
189 |
// Bendie: |
| 190 |
public Action toggleStatusbar; |
| 191 |
// Bendie: |
| 192 |
public Action toggleFullscreen; |
| 182 |
|
193 |
|
| 183 |
public Action zoomIn; |
194 |
public Action zoomIn; |
| 184 |
public Action zoomOut; |
195 |
public Action zoomOut; |
| 185 |
|
196 |
|
| 186 |
public Action showSelectionAsRectangle; |
197 |
public Action showSelectionAsRectangle; |
|
|
198 |
|
| 199 |
// Bendie: |
| 200 |
public Action alwaysCenterSelected; |
| 201 |
|
| 187 |
public PropertyAction propertyAction; |
202 |
public PropertyAction propertyAction; |
| 188 |
public OpenURLAction freemindUrl; |
203 |
public OpenURLAction freemindUrl; |
| 189 |
|
204 |
|
|
Lines 257-262
Link Here
|
| 257 |
toggleMenubar = new ToggleMenubarAction(this); |
272 |
toggleMenubar = new ToggleMenubarAction(this); |
| 258 |
toggleToolbar = new ToggleToolbarAction(this); |
273 |
toggleToolbar = new ToggleToolbarAction(this); |
| 259 |
toggleLeftToolbar = new ToggleLeftToolbarAction(this); |
274 |
toggleLeftToolbar = new ToggleLeftToolbarAction(this); |
|
|
275 |
|
| 276 |
// Bendie: |
| 277 |
toggleStatusbar = new ToggleStatusbarAction(this); |
| 278 |
// Bendie: |
| 279 |
toggleFullscreen = new ToggleFullscreenAction(this); |
| 280 |
|
| 260 |
optionAntialiasAction = new OptionAntialiasAction(this); |
281 |
optionAntialiasAction = new OptionAntialiasAction(this); |
| 261 |
optionHTMLExportFoldingAction = new OptionHTMLExportFoldingAction(this); |
282 |
optionHTMLExportFoldingAction = new OptionHTMLExportFoldingAction(this); |
| 262 |
optionSelectionMechanismAction = new OptionSelectionMechanismAction(this); |
283 |
optionSelectionMechanismAction = new OptionSelectionMechanismAction(this); |
|
Lines 266-273
Link Here
|
| 266 |
propertyAction = new PropertyAction(this); |
287 |
propertyAction = new PropertyAction(this); |
| 267 |
|
288 |
|
| 268 |
showSelectionAsRectangle = new ShowSelectionAsRectangleAction(this); |
289 |
showSelectionAsRectangle = new ShowSelectionAsRectangleAction(this); |
|
|
290 |
|
| 291 |
// Bendie: |
| 292 |
alwaysCenterSelected = new AlwaysCenterSelectedAction(this); |
| 269 |
|
293 |
|
| 270 |
moveToRoot = new MoveToRootAction(this); |
294 |
moveToRoot = new MoveToRootAction(this); |
|
|
295 |
|
| 296 |
// Bendie: |
| 297 |
moveToSelected = new MoveToSelectedAction(this); |
| 271 |
|
298 |
|
| 272 |
//Create the ToolBar |
299 |
//Create the ToolBar |
| 273 |
northToolbarPanel = new JPanel(new BorderLayout()); |
300 |
northToolbarPanel = new JPanel(new BorderLayout()); |
|
Lines 631-636
Link Here
|
| 631 |
toolbarVisible = visible; |
658 |
toolbarVisible = visible; |
| 632 |
toolbar.setVisible(toolbarVisible); |
659 |
toolbar.setVisible(toolbarVisible); |
| 633 |
} |
660 |
} |
|
|
661 |
|
| 662 |
// Bendie: |
| 663 |
public void setStatusbarVisible(boolean visible) { |
| 664 |
statusbarVisible = visible; |
| 665 |
getFrame().getFreemindStatusbar().setVisible(statusbarVisible); |
| 666 |
} |
| 667 |
|
| 668 |
// Bendie: |
| 669 |
public void setFullscreen(boolean fullscreen) { |
| 670 |
isFullscreen = fullscreen; |
| 671 |
getFrame().setFullscreen(isFullscreen); |
| 672 |
} |
| 634 |
|
673 |
|
| 635 |
/** |
674 |
/** |
| 636 |
* @return Returns the main toolbar. |
675 |
* @return Returns the main toolbar. |
|
Lines 692-697
Link Here
|
| 692 |
getView().moveToRoot(); |
731 |
getView().moveToRoot(); |
| 693 |
} |
732 |
} |
| 694 |
} |
733 |
} |
|
|
734 |
|
| 735 |
// Bendie: |
| 736 |
void moveToSelected() { |
| 737 |
if (getMapModule() != null) { |
| 738 |
getView().moveToSelected(); |
| 739 |
} |
| 740 |
} |
| 695 |
|
741 |
|
| 696 |
/** Closes the actual map. |
742 |
/** Closes the actual map. |
| 697 |
* @param force true= without save. |
743 |
* @param force true= without save. |
|
Lines 853-864
Link Here
|
| 853 |
page.setEnabled(enabled && isPrintingAllowed); |
899 |
page.setEnabled(enabled && isPrintingAllowed); |
| 854 |
close.setEnabled(enabled); |
900 |
close.setEnabled(enabled); |
| 855 |
moveToRoot.setEnabled(enabled); |
901 |
moveToRoot.setEnabled(enabled); |
|
|
902 |
|
| 903 |
// Bendie: |
| 904 |
moveToSelected.setEnabled(enabled); |
| 905 |
|
| 856 |
showAllAttributes.setEnabled(enabled); |
906 |
showAllAttributes.setEnabled(enabled); |
| 857 |
showSelectedAttributes.setEnabled(enabled); |
907 |
showSelectedAttributes.setEnabled(enabled); |
| 858 |
hideAllAttributes.setEnabled(enabled); |
908 |
hideAllAttributes.setEnabled(enabled); |
| 859 |
showAttributeManagerAction.setEnabled(enabled); |
909 |
showAttributeManagerAction.setEnabled(enabled); |
| 860 |
((MainToolBar)getToolBar()).setAllActions(enabled); |
910 |
((MainToolBar)getToolBar()).setAllActions(enabled); |
| 861 |
showSelectionAsRectangle.setEnabled(enabled); |
911 |
showSelectionAsRectangle.setEnabled(enabled); |
|
|
912 |
|
| 913 |
// Bendie: |
| 914 |
alwaysCenterSelected.setEnabled(enabled); |
| 862 |
} |
915 |
} |
| 863 |
|
916 |
|
| 864 |
// |
917 |
// |
|
Lines 887-894
Link Here
|
| 887 |
getFrame().setProperty(FreeMindCommon.ON_START_IF_NOT_SPECIFIED,currentMapRestorable); } |
940 |
getFrame().setProperty(FreeMindCommon.ON_START_IF_NOT_SPECIFIED,currentMapRestorable); } |
| 888 |
// getFrame().setProperty("menubarVisible",menubarVisible ? "true" : "false"); |
941 |
// getFrame().setProperty("menubarVisible",menubarVisible ? "true" : "false"); |
| 889 |
// ^ Not allowed in application because of problems with not working key shortcuts |
942 |
// ^ Not allowed in application because of problems with not working key shortcuts |
|
|
943 |
|
| 944 |
// Bendie: |
| 945 |
setProperty("menubarVisible", menubarVisible ? "true" : "false"); |
| 946 |
|
| 890 |
setProperty("toolbarVisible", toolbarVisible ? "true" : "false"); |
947 |
setProperty("toolbarVisible", toolbarVisible ? "true" : "false"); |
| 891 |
setProperty("leftToolbarVisible", leftToolbarVisible ? "true" : "false"); |
948 |
setProperty("leftToolbarVisible", leftToolbarVisible ? "true" : "false"); |
|
|
949 |
|
| 950 |
// Bendie: |
| 951 |
setProperty("statusbarVisible", statusbarVisible ? "true" : "false"); |
| 952 |
|
| 892 |
setProperty("antialiasEdges", antialiasEdges ? "true" : "false"); |
953 |
setProperty("antialiasEdges", antialiasEdges ? "true" : "false"); |
| 893 |
setProperty("antialiasAll", antialiasAll ? "true" : "false"); |
954 |
setProperty("antialiasAll", antialiasAll ? "true" : "false"); |
| 894 |
if(! getFrame().isApplet()) { |
955 |
if(! getFrame().isApplet()) { |
|
Lines 1286-1291
Link Here
|
| 1286 |
moveToRoot(); |
1347 |
moveToRoot(); |
| 1287 |
} |
1348 |
} |
| 1288 |
} |
1349 |
} |
|
|
1350 |
|
| 1351 |
// Bendie: |
| 1352 |
private class MoveToSelectedAction extends AbstractAction { |
| 1353 |
MoveToSelectedAction(Controller controller) { |
| 1354 |
super(controller.getResourceString("move_to_selected")); |
| 1355 |
setEnabled(false); |
| 1356 |
} |
| 1357 |
public void actionPerformed(ActionEvent event) { |
| 1358 |
moveToSelected(); |
| 1359 |
} |
| 1360 |
} |
| 1289 |
|
1361 |
|
| 1290 |
private class ToggleMenubarAction extends AbstractAction implements MenuItemSelectedListener { |
1362 |
private class ToggleMenubarAction extends AbstractAction implements MenuItemSelectedListener { |
| 1291 |
ToggleMenubarAction(Controller controller) { |
1363 |
ToggleMenubarAction(Controller controller) { |
|
Lines 1329-1334
Link Here
|
| 1329 |
return leftToolbarVisible; |
1401 |
return leftToolbarVisible; |
| 1330 |
} |
1402 |
} |
| 1331 |
} |
1403 |
} |
|
|
1404 |
|
| 1405 |
// Bendie: |
| 1406 |
private class ToggleStatusbarAction extends AbstractAction implements MenuItemSelectedListener { |
| 1407 |
ToggleStatusbarAction(Controller controller) { |
| 1408 |
super(controller.getResourceString("toggle_statusbar")); |
| 1409 |
setEnabled(true); |
| 1410 |
} |
| 1411 |
public void actionPerformed(ActionEvent event) { |
| 1412 |
statusbarVisible=!statusbarVisible; |
| 1413 |
setStatusbarVisible(statusbarVisible); |
| 1414 |
} |
| 1415 |
public boolean isSelected(JMenuItem pCheckItem, Action pAction) { |
| 1416 |
return statusbarVisible; |
| 1417 |
} |
| 1418 |
} |
| 1419 |
|
| 1420 |
// Bendie: |
| 1421 |
private class ToggleFullscreenAction extends AbstractAction implements MenuItemSelectedListener { |
| 1422 |
ToggleFullscreenAction(Controller controller) { |
| 1423 |
super(controller.getResourceString("toggle_fullscreen")); |
| 1424 |
setEnabled(true); |
| 1425 |
} |
| 1426 |
public void actionPerformed(ActionEvent event) { |
| 1427 |
isFullscreen=!isFullscreen; |
| 1428 |
setFullscreen(isFullscreen); |
| 1429 |
} |
| 1430 |
public boolean isSelected(JMenuItem pCheckItem, Action pAction) { |
| 1431 |
return isFullscreen; |
| 1432 |
} |
| 1433 |
} |
| 1332 |
|
1434 |
|
| 1333 |
protected class ZoomInAction extends AbstractAction { |
1435 |
protected class ZoomInAction extends AbstractAction { |
| 1334 |
public ZoomInAction(Controller controller) { |
1436 |
public ZoomInAction(Controller controller) { |
|
Lines 1355-1360
Link Here
|
| 1355 |
return isSelectionAsRectangle(); |
1457 |
return isSelectionAsRectangle(); |
| 1356 |
} |
1458 |
} |
| 1357 |
} |
1459 |
} |
|
|
1460 |
|
| 1461 |
// Bendie: |
| 1462 |
protected class AlwaysCenterSelectedAction extends AbstractAction implements MenuItemSelectedListener{ |
| 1463 |
public AlwaysCenterSelectedAction(Controller controller) { |
| 1464 |
super(controller.getResourceString("always_center_selected")); } |
| 1465 |
public void actionPerformed(ActionEvent e) { |
| 1466 |
// logger.info("AlwaysCenterSelectedAction action Performed"); |
| 1467 |
toggleAlwaysCenterSelected(); |
| 1468 |
} |
| 1469 |
public boolean isSelected(JMenuItem pCheckItem, Action pAction) { |
| 1470 |
return isAlwaysCenterSelected(); |
| 1471 |
} |
| 1472 |
} |
| 1358 |
|
1473 |
|
| 1359 |
private class ShowAllAttributesAction extends AbstractAction { |
1474 |
private class ShowAllAttributesAction extends AbstractAction { |
| 1360 |
public ShowAllAttributesAction(){ |
1475 |
public ShowAllAttributesAction(){ |
|
Lines 1422-1427
Link Here
|
| 1422 |
setProperty(FreeMind.RESOURCE_DRAW_RECTANGLE_FOR_SELECTION, BooleanProperty.TRUE_VALUE); |
1537 |
setProperty(FreeMind.RESOURCE_DRAW_RECTANGLE_FOR_SELECTION, BooleanProperty.TRUE_VALUE); |
| 1423 |
} |
1538 |
} |
| 1424 |
} |
1539 |
} |
|
|
1540 |
|
| 1541 |
// Bendie: |
| 1542 |
// TODO: Find a way to make the change of selection method temporary (not to remember after quitting) |
| 1543 |
private String former_selection_method = "selection_method_by_click"; |
| 1544 |
public void toggleAlwaysCenterSelected() { |
| 1545 |
if (isAlwaysCenterSelected()) { |
| 1546 |
setProperty(FreeMind.RESOURCE_ALWAYS_CENTER_SELECTED, BooleanProperty.FALSE_VALUE); |
| 1547 |
setProperty(FreeMind.RESOURCES_SELECTION_METHOD, former_selection_method); |
| 1548 |
} |
| 1549 |
else { |
| 1550 |
setProperty(FreeMind.RESOURCE_ALWAYS_CENTER_SELECTED, BooleanProperty.TRUE_VALUE); |
| 1551 |
former_selection_method = getProperty(FreeMind.RESOURCES_SELECTION_METHOD); |
| 1552 |
setProperty(FreeMind.RESOURCES_SELECTION_METHOD, "selection_method_by_click"); |
| 1553 |
} |
| 1554 |
} |
| 1555 |
|
| 1556 |
private boolean isAlwaysCenterSelected() { |
| 1557 |
return getProperty(FreeMind.RESOURCE_ALWAYS_CENTER_SELECTED).equalsIgnoreCase(BooleanProperty.TRUE_VALUE); |
| 1558 |
} |
| 1425 |
|
1559 |
|
| 1426 |
private boolean isSelectionAsRectangle() { |
1560 |
private boolean isSelectionAsRectangle() { |
| 1427 |
return getProperty(FreeMind.RESOURCE_DRAW_RECTANGLE_FOR_SELECTION).equalsIgnoreCase(BooleanProperty.TRUE_VALUE); |
1561 |
return getProperty(FreeMind.RESOURCE_DRAW_RECTANGLE_FOR_SELECTION).equalsIgnoreCase(BooleanProperty.TRUE_VALUE); |