| 1 | |
package org.jtheque.core.managers.feature; |
| 2 | |
|
| 3 | |
import org.jtheque.core.managers.core.Core; |
| 4 | |
import org.jtheque.core.managers.view.impl.actions.about.DisplayAboutViewAction; |
| 5 | |
import org.jtheque.core.managers.view.impl.actions.author.AcInformOfABug; |
| 6 | |
import org.jtheque.core.managers.view.impl.actions.author.AcOpenHelp; |
| 7 | |
import org.jtheque.core.managers.view.impl.actions.author.AcProposeImprovement; |
| 8 | |
import org.jtheque.core.managers.view.impl.actions.backup.AcBackupToJTD; |
| 9 | |
import org.jtheque.core.managers.view.impl.actions.backup.AcBackupToXML; |
| 10 | |
import org.jtheque.core.managers.view.impl.actions.backup.AcRestoreFromJTD; |
| 11 | |
import org.jtheque.core.managers.view.impl.actions.backup.AcRestoreFromXML; |
| 12 | |
import org.jtheque.core.managers.view.impl.actions.core.ExitAction; |
| 13 | |
import org.jtheque.core.managers.view.impl.actions.undo.RedoAction; |
| 14 | |
import org.jtheque.core.managers.view.impl.actions.undo.UndoAction; |
| 15 | |
|
| 16 | |
import java.util.List; |
| 17 | |
|
| 18 | |
|
| 19 | |
|
| 20 | |
|
| 21 | |
|
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | 0 | public final class CoreMenu extends AbstractMenu { |
| 40 | |
@Override |
| 41 | |
protected List<Feature> getFileMenuSubFeatures(){ |
| 42 | 0 | return features( |
| 43 | |
createSeparatedSubFeature(200, "menu.backup", |
| 44 | |
createSubFeature(1, new AcBackupToJTD()), |
| 45 | |
createSubFeature(2, new AcBackupToXML())), |
| 46 | |
createSubFeature(201, "menu.restore", |
| 47 | |
createSubFeature(1, new AcRestoreFromJTD()), |
| 48 | |
createSubFeature(2, new AcRestoreFromXML())), |
| 49 | |
createSeparatedSubFeature(1000, new ExitAction()) |
| 50 | |
); |
| 51 | |
} |
| 52 | |
|
| 53 | |
@Override |
| 54 | |
protected List<Feature> getEditMenuSubFeatures(){ |
| 55 | 0 | return features( |
| 56 | |
createSubFeature(1, new UndoAction()), |
| 57 | |
createSubFeature(2, new RedoAction()) |
| 58 | |
); |
| 59 | |
} |
| 60 | |
|
| 61 | |
@Override |
| 62 | |
protected List<Feature> getAdvancedMenuSubFeatures(){ |
| 63 | 0 | return features( |
| 64 | |
createSeparatedSubFeature(500, createDisplayViewAction("config.actions.display", "configView"), Core.IMAGES_BASE_NAME, "options"), |
| 65 | |
createSeparatedSubFeature(750, createDisplayViewAction("modules.actions.manage", "moduleView"), Core.IMAGES_BASE_NAME, "update") |
| 66 | |
); |
| 67 | |
} |
| 68 | |
|
| 69 | |
@Override |
| 70 | |
protected List<Feature> getHelpMenuSubFeatures(){ |
| 71 | 0 | return features( |
| 72 | |
createSeparatedSubFeature(1, new AcOpenHelp(), Core.IMAGES_BASE_NAME, "help"), |
| 73 | |
createSeparatedSubFeature(2, new AcInformOfABug(), Core.IMAGES_BASE_NAME, "mail"), |
| 74 | |
createSeparatedSubFeature(4, new AcProposeImprovement(), Core.IMAGES_BASE_NAME, "idea"), |
| 75 | |
createSeparatedSubFeature(6, createDisplayViewAction("messages.actions.display", "messageView")), |
| 76 | |
createSeparatedSubFeature(25, createDisplayViewAction("log.view.actions.display", "logView")), |
| 77 | |
createSeparatedSubFeature(150, new DisplayAboutViewAction(), Core.IMAGES_BASE_NAME, "about") |
| 78 | |
); |
| 79 | |
} |
| 80 | |
} |