本文整理汇总了Java中net.sf.memoranda.ui.AppFrame类的典型用法代码示例。如果您正苦于以下问题:Java AppFrame类的具体用法?Java AppFrame怎么用?Java AppFrame使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AppFrame类属于net.sf.memoranda.ui包,在下文中一共展示了AppFrame类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import net.sf.memoranda.ui.AppFrame; //导入依赖的package包/类
private static void init() {
String prjId = (String) Context.get("LAST_OPENED_PROJECT_ID");
if (prjId == null) {
prjId = "__default";
Context.put("LAST_OPENED_PROJECT_ID", prjId);
}
//ProjectManager.init();
_project = ProjectManager.getProject(prjId);
if (_project == null) {
// alexeya: Fixed bug with NullPointer when LAST_OPENED_PROJECT_ID
// references to missing project
_project = ProjectManager.getProject("__default");
if (_project == null)
_project = (Project) ProjectManager.getActiveProjects().get(0);
Context.put("LAST_OPENED_PROJECT_ID", _project.getID());
}
_tasklist = CurrentStorage.get().openTaskList(_project);
_notelist = CurrentStorage.get().openNoteList(_project);
_resources = CurrentStorage.get().openResourcesList(_project);
m_defectList = CurrentStorage.get().openDefectList(_project);
AppFrame.addExitListener(e -> save());
}
示例2: ppRemoveBkmrk_actionPerformed
import net.sf.memoranda.ui.AppFrame; //导入依赖的package包/类
void ppRemoveBkmrk_actionPerformed(ActionEvent e) {
for (int i = 0; i < notesList.getSelectedIndices().length; i++) {
Note note = (Note) notesList.getNote(notesList.getSelectedIndices()[i]);
note.setMark(false);
}
bookmarksListPanel.notesList.update();
ppSetEnabled();
notesList.updateUI();
notesList.clearSelection();
((AppFrame)App.getFrame()).workPanel.dailyItemsPanel.editorPanel.editor.requestFocus();
}
示例3: ppRemoveBkmrk_actionPerformed
import net.sf.memoranda.ui.AppFrame; //导入依赖的package包/类
void ppRemoveBkmrk_actionPerformed(ActionEvent e) {
for (int i = 0; i < notesList.getSelectedIndices().length; i++) {
Note note = (Note) notesList.getNote(notesList.getSelectedIndices()[i]);
note.setMark(false);
}
bookmarksListPanel.notesList.update();
ppSetEnabled();
notesList.updateUI();
notesList.clearSelection();
((AppFrame)App.getFrame()).workPanel.dailyItemsPanel.editorPanel.editor.requestFocus();
}
示例4: setUp
import net.sf.memoranda.ui.AppFrame; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
application(Start.class).start();
AppFrame notesFrame = GuiActionRunner.execute(() -> new AppFrame());
window = new FrameFixture(notesFrame);
window.show();
}
示例5: start
import net.sf.memoranda.ui.AppFrame; //导入依赖的package包/类
@Before
public void start() throws Exception {
application(Start.class).start();
AppFrame notesFrame = GuiActionRunner.execute(new Callable<AppFrame>() {
public AppFrame call() throws Exception {
return new AppFrame();
}
});
window = new FrameFixture(notesFrame);
window.show();
}
示例6: setUp
import net.sf.memoranda.ui.AppFrame; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
application(Start.class).start();
AppFrame notesFrame = GuiActionRunner.execute(() -> new AppFrame());
window = new FrameFixture(notesFrame);
//window.show();
}
示例7: ppRemoveBkmrk_actionPerformed
import net.sf.memoranda.ui.AppFrame; //导入依赖的package包/类
void ppRemoveBkmrk_actionPerformed(ActionEvent e) {
for (int i = 0; i < notesList.getSelectedIndices().length; i++) {
Note note = (Note) notesList.getNote(notesList.getSelectedIndices()[i]);
note.setMark(false);
}
bookmarksListPanel.notesList.update();
ppSetEnabled();
notesList.updateUI();
notesList.clearSelection();
((AppFrame) App.getFrame()).workPanel.dailyItemsPanel.editorPanel.editor.requestFocus();
}
示例8: generateStickers
import net.sf.memoranda.ui.AppFrame; //导入依赖的package包/类
private static String generateStickers() {
String iurl =
net
.sf
.memoranda
.ui
.AppFrame
.class
.getResource("resources/agenda/addsticker.gif")
.toExternalForm();
String iurl2 =
net
.sf
.memoranda
.ui
.AppFrame
.class
.getResource("resources/agenda/removesticker.gif")
.toExternalForm();
String s = "<hr><hr><table border=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td><a href=\"memoranda:importstickers\"><b>" + Local.getString("Import Stickers") + "</b></a></td><td><a href=\"memoranda:exportstickerst\"><b>" + Local.getString("Export Stickers to Text File") + "</b></a><td><a href=\"memoranda:exportstickersh\"><b>" + Local.getString("Export Stickers to HTML File") + "</b></a></td></tr></table>"
+ "<table border=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td><a href=\"memoranda:addsticker\"><img align=\"left\" width=\"22\" height=\"22\" src=\""
+ iurl
+ "\" border=\"0\" hspace=\"0\" vspace=\"0\" alt=\"New sticker\"></a></td><td width=\"100%\"><a href=\"memoranda:addsticker\"><b> "
+ Local.getString("Add sticker") + "</b></a></td></tr></table>";
PriorityQueue pQ = sortStickers();
while (!pQ.Vacia()) {
Element el = pQ.extraer();
String id = el.getAttributeValue("id");
String txt = el.getValue();
s += "\n<table border=\"0\" cellpadding=\"0\" width=\"100%\"><table width=\"100%\"><tr bgcolor=\"#E0E0E0\"><td><a href=\"memoranda:editsticker#" + id + "\">" + Local.getString("EDIT") + "</a></td><td width=\"70%\"><a href=\"memoranda:expandsticker#" + id + "\">" + Local.getString("OPEN IN A NEW WINDOW") + "</></td><td align=\"right\">" +
" " + // without this removesticker link takes klicks from whole cell
"<a href=\"memoranda:removesticker#" + id + "\"><img align=\"left\" width=\"14\" height=\"14\" src=\""
+ iurl2
+ "\" border=\"0\" hspace=\"0\" vspace=\"0\" alt=\"Remove sticker\"></a></td></table></tr><tr><td>" + txt + "</td></tr></table>";
}
s += "<hr>";
return s;
}
示例9: NewProjAction
import net.sf.memoranda.ui.AppFrame; //导入依赖的package包/类
public NewProjAction() {
super(Local.getString("Create Project"),
new ImageIcon(AppFrame.class.getResource("resources/icons/newproject.png")));
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.ALT_MASK));
setEnabled(true);
refresh(CurrentDate.get());
}
示例10: RemoveProjAction
import net.sf.memoranda.ui.AppFrame; //导入依赖的package包/类
public RemoveProjAction() {
super(Local.getString("Delete Project"),
new ImageIcon(AppFrame.class.getResource("resources/icons/removeproject.png")));
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.ALT_MASK));
if(!CurrentProject.get().getTitle().equals("Default Project") ||
ProjectManager.getActiveProjectsNumber() > 1)
setEnabled(true);
else
setEnabled(false);
refresh(CurrentDate.get());
}
示例11: setUpBeforeClass
import net.sf.memoranda.ui.AppFrame; //导入依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
appFrame = new AppFrame(false);
}
示例12: generateEventsInfo
import net.sf.memoranda.ui.AppFrame; //导入依赖的package包/类
private static String generateEventsInfo(CalendarDate date) {
String s =
"<td width=\"34%\" valign=\"top\">"
+ "<a href=\"memoranda:events\"><h1>"
+ Local.getString("Events")
+ "</h1></a>\n"
+ "<table width=\"100%\" valign=\"top\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFF6\">\n";
Vector v = (Vector) EventsManager.getEventsForDate(date);
int n = 0;
for (Object aV : v) {
Event e = (Event) aV;
String txt = e.getText();
String iurl =
AppFrame
.class
.getResource("resources/agenda/spacer.gif")
.toExternalForm();
if (date.equals(CalendarDate.today())) {
if (e.getTime().after(new Date()))
txt = "<b>" + txt + "</b>";
if ((EventsScheduler.isEventScheduled())
&& (EventsScheduler
.getFirstScheduledEvent()
.getTime()
.equals(e.getTime()))) {
iurl =
AppFrame
.class
.getResource("resources/agenda/arrow.gif")
.toExternalForm();
}
}
String icon =
"<img align=\"right\" width=\"16\" height=\"16\" src=\""
+ iurl
+ "\" border=\"0\" hspace=\"0\" vspace=\"0\" alt=\"\">";
s += "<tr>\n<td>"
+ icon
+ "</td>"
+ "<td nowrap class=\"eventtime\">"
+ e.getTimeString()
+ "</td>"
+ "<td width=\"100%\" class=\"eventtext\"> "
+ txt
+ "</td>\n"
+ "</tr>";
}
return s + "</table>";
}