bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
|---|---|---|
public String getNewId() { return (String)u2; }
|
public String getNewId() { return (String)u2; }
| 3,232,449
|
public Node getNextNode() { return (Node)u3; }
|
public Node getNextNode() { return (Node)u3; }
| 3,232,450
|
public int getNoex() { return u1 == null ? 0 : ((Integer)u1).intValue(); }
|
public int getNoex() { return u1 == null ? 0 : ((Integer)u1).intValue(); }
| 3,232,451
|
public int getNth() { return u2 == null ? 0 : ((Integer)u2).intValue(); }
|
public int getNth() { return u2 == null ? 0 : ((Integer)u2).intValue(); }
| 3,232,452
|
public String getOldId() { return (String)u1; }
|
public String getOldId() { return (String)u1; }
| 3,232,453
|
public Node getOptNode() { return (Node)u1; }
|
public Node getOptNode() { return (Node)u1; }
| 3,232,454
|
public RubyObject getOrigin() { return (RubyObject)u3; }
|
public RubyObject getOrigin() { return (RubyObject)u3; }
| 3,232,455
|
public Node getRecvNode() { return (Node)u1; }
|
public Node getRecvNode() { return (Node)u1; }
| 3,232,456
|
public CRefNode getRefValue() { return (CRefNode)u2; }
|
public CRefNode getRefValue() { return (CRefNode)u2; }
| 3,232,457
|
public Node getResqNode() { return (Node)u2; }
|
public Node getResqNode() { return (Node)u2; }
| 3,232,458
|
public int getRest() { return u2 == null ? 0 : ((Integer)u2).intValue(); }
|
public int getRest() { return u2 == null ? 0 : ((Integer)u2).intValue(); }
| 3,232,459
|
public Node getSecondNode() { return (Node)u2; }
|
public Node getSecondNode() { return (Node)u2; }
| 3,232,460
|
public int getState() { return u3 == null ? 0 : ((Integer)u3).intValue(); }
|
public int getState() { return u3 == null ? 0 : ((Integer)u3).intValue(); }
| 3,232,461
|
public Node getSttsNode() { return (Node)u1; }
|
public Node getSttsNode() { return (Node)u1; }
| 3,232,462
|
public Node getSuperNode() { return (Node)u3; }
|
public Node getSuperNode() { return (Node)u3; }
| 3,232,463
|
public RubyObject getTValue() { return (RubyObject)u2; }
|
public RubyObject getTValue() { return (RubyObject)u2; }
| 3,232,464
|
public List getTable() { return (List)u1; }
|
public List getTable() { return (List)u1; }
| 3,232,465
|
public String getTagId() { return (String)u1; }
|
public String getTagId() { return (String)u1; }
| 3,232,466
|
public int getType() { return type; }
|
public int getType() { return type; }
| 3,232,467
|
public String getVId() { return (String)u1; }
|
public String getVId() { return (String)u1; }
| 3,232,468
|
public Node getValueNode() { return (Node)u2; }
|
public Node getValueNode() { return (Node)u2; }
| 3,232,469
|
public Node getVarNode() { return (Node)u1; }
|
public Node getVarNode() { return (Node)u1; }
| 3,232,470
|
public void setAId(String newAid) { u3 = newAid; }
|
public void setAId(String newAid) { u3 = newAid; }
| 3,232,471
|
public void setALength(int alength) { u2 = new Integer(alength); }
|
public void setALength(int alength) { u2 = new Integer(alength); }
| 3,232,472
|
public void setArgsNode(Node newArgsNode) { u3 = newArgsNode; }
|
public void setArgsNode(Node newArgsNode) { u3 = newArgsNode; }
| 3,232,473
|
public void setBeginNode(Node newBeginNode) { u1 = newBeginNode; }
|
public void setBeginNode(Node newBeginNode) { u1 = newBeginNode; }
| 3,232,474
|
public void setCFlag(int cflag) { u2 = cflag == 0 ? null : new Integer(cflag); }
|
public void setCFlag(int cflag) { u2 = cflag == 0 ? null : new Integer(cflag); }
| 3,232,475
|
public void setClassValue(RubyObject newClassValue) { u1 = newClassValue; }
|
public void setClassValue(RubyObject newClassValue) { u1 = newClassValue; }
| 3,232,476
|
public void setCount(int newCount) { u3 = newCount == 0 ? null : new Integer(newCount); }
|
public void setCount(int newCount) { u3 = newCount == 0 ? null : new Integer(newCount); }
| 3,232,477
|
public void setEndNode(Node newEndNode) { u2 = newEndNode; }
|
public void setEndNode(Node newEndNode) { u2 = newEndNode; }
| 3,232,478
|
public void setFile(String file) { this.file = file; }
|
public void setFile(String file) { this.file = file; }
| 3,232,479
|
public void setHeadNode(Node headNode) { u1 = headNode; }
|
public void setHeadNode(Node headNode) { u1 = headNode; }
| 3,232,480
|
public void setIterNode(Node newIterNode) { u3 = newIterNode; }
|
public void setIterNode(Node newIterNode) { u3 = newIterNode; }
| 3,232,481
|
public void setLine(int line) { this.line = line; }
|
public void setLine(int line) { this.line = line; }
| 3,232,482
|
public void setLiteral(RubyObject newLiteral) { u1 = newLiteral; }
|
public void setLiteral(RubyObject newLiteral) { u1 = newLiteral; }
| 3,232,483
|
public void setNextNode(Node nextNode) { u3 = nextNode; }
|
public void setNextNode(Node nextNode) { u3 = nextNode; }
| 3,232,484
|
public void setNoex(int newNoex) { u1 = newNoex == 0 ? null : new Integer(newNoex); }
|
public void setNoex(int newNoex) { u1 = newNoex == 0 ? null : new Integer(newNoex); }
| 3,232,485
|
public void setNth(int newNth) { u2 = newNth == 0 ? null : new Integer(newNth); }
|
public void setNth(int newNth) { u2 = newNth == 0 ? null : new Integer(newNth); }
| 3,232,486
|
public void setRefValue(CRefNode newRefValue) { u2 = newRefValue; }
|
public void setRefValue(CRefNode newRefValue) { u2 = newRefValue; }
| 3,232,487
|
public void setTable(List newTable) { u1 = newTable; }
|
public void setTable(List newTable) { u1 = newTable; }
| 3,232,488
|
public void setValueNode(Node newValueNode) { u2 = newValueNode; }
|
public void setValueNode(Node newValueNode) { u2 = newValueNode; }
| 3,232,489
|
protected String stringOrNull(Object io) { if (io == null) return "null"; else return io.toString(); }
|
protected String stringOrNull(Object io) { if (io == null) return "null"; else return io.toString(); }
| 3,232,490
|
public IRubyObject cause() { return JavaObject.wrap(getRuntime(), cause); }
|
public IRubyObject cause() { return getRuntime().getModule("JavaUtilities").callMethod(getRuntime().getCurrentContext(), "wrap", JavaObject.wrap(getRuntime(), cause)); }
| 3,232,491
|
public void initialize() { final SwingWorker bookmarkThreadWorker = new SwingWorker() { public Object construct() { // Register own provider for simpler implementation. PrivateDataManager.addPrivateDataProvider("storage", "storage:bookmarks", new Bookmarks.Provider()); PrivateDataManager manager = new PrivateDataManager(SparkManager.getConnection()); Bookmarks bookmarks = null; try { bookmarks = (Bookmarks)manager.getPrivateData("storage", "storage:bookmarks"); } catch (XMPPException e) { Log.error(e); } return bookmarks; } public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); final JPopupMenu popup = new JPopupMenu(); if (bookmarks != null) { // Add to status bar final JPanel commandPanel = SparkManager.getWorkspace().getStatusBar().getCommandPanel(); final RolloverButton bookmarkButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.BOOKMARK_ICON)); bookmarkButton.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent mouseEvent) { popup.show(bookmarkButton, mouseEvent.getX(), mouseEvent.getY()); } }); bookmarkButton.setToolTipText("View Bookmarks"); commandPanel.add(bookmarkButton); SparkManager.getWorkspace().getStatusBar().invalidate(); SparkManager.getWorkspace().getStatusBar().validate(); SparkManager.getWorkspace().getStatusBar().repaint(); Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); final Iterator bookmarkLinks = bookmarkedLinks.iterator(); while (bookmarkLinks.hasNext()) { final BookmarkedURL link = (BookmarkedURL)bookmarkLinks.next(); Action urlAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { try { BrowserLauncher.openURL(link.getURL()); } catch (IOException e) { Log.error(e); } } }; urlAction.putValue(Action.NAME, link.getName()); urlAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.LINK_16x16)); popup.add(urlAction); } final Iterator bookmarkConferences = bookmarkedConferences.iterator(); while (bookmarkConferences.hasNext()) { final BookmarkedConference conferences = (BookmarkedConference)bookmarkConferences.next(); Action conferenceAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { SwingWorker worker = new SwingWorker() { public Object construct() { try { Thread.sleep(10); } catch (InterruptedException e1) { Log.error(e1); } return "ok"; } public void finished() { ConferenceUtils.autoJoinConferenceRoom(conferences.getName(), conferences.getJid(), conferences.getPassword()); } }; worker.start(); } }; conferenceAction.putValue(Action.NAME, conferences.getName()); conferenceAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.CONFERENCE_IMAGE_16x16)); popup.add(conferenceAction); } } } }; bookmarkThreadWorker.start(); }
|
public void initialize() { final SwingWorker bookmarkThreadWorker = new SwingWorker() { public Object construct() { // Register own provider for simpler implementation. PrivateDataManager.addPrivateDataProvider("storage", "storage:bookmarks", new Bookmarks.Provider()); PrivateDataManager manager = new PrivateDataManager(SparkManager.getConnection()); Bookmarks bookmarks = null; try { bookmarks = (Bookmarks)manager.getPrivateData("storage", "storage:bookmarks"); } catch (XMPPException e) { Log.error(e); } return bookmarks; } public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); final JPopupMenu popup = new JPopupMenu(); if (bookmarks != null) { // Add to status bar final JPanel commandPanel = SparkManager.getWorkspace().getStatusBar().getCommandPanel(); final RolloverButton bookmarkButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.BOOKMARK_ICON)); bookmarkButton.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent mouseEvent) { popup.show(bookmarkButton, mouseEvent.getX(), mouseEvent.getY()); } }); bookmarkButton.setToolTipText(Res.getString("title.view.bookmarks")); commandPanel.add(bookmarkButton); SparkManager.getWorkspace().getStatusBar().invalidate(); SparkManager.getWorkspace().getStatusBar().validate(); SparkManager.getWorkspace().getStatusBar().repaint(); Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); final Iterator bookmarkLinks = bookmarkedLinks.iterator(); while (bookmarkLinks.hasNext()) { final BookmarkedURL link = (BookmarkedURL)bookmarkLinks.next(); Action urlAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { try { BrowserLauncher.openURL(link.getURL()); } catch (IOException e) { Log.error(e); } } }; urlAction.putValue(Action.NAME, link.getName()); urlAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.LINK_16x16)); popup.add(urlAction); } final Iterator bookmarkConferences = bookmarkedConferences.iterator(); while (bookmarkConferences.hasNext()) { final BookmarkedConference conferences = (BookmarkedConference)bookmarkConferences.next(); Action conferenceAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { SwingWorker worker = new SwingWorker() { public Object construct() { try { Thread.sleep(10); } catch (InterruptedException e1) { Log.error(e1); } return "ok"; } public void finished() { ConferenceUtils.autoJoinConferenceRoom(conferences.getName(), conferences.getJid(), conferences.getPassword()); } }; worker.start(); } }; conferenceAction.putValue(Action.NAME, conferences.getName()); conferenceAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.CONFERENCE_IMAGE_16x16)); popup.add(conferenceAction); } } } }; bookmarkThreadWorker.start(); }
| 3,232,492
|
public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); final JPopupMenu popup = new JPopupMenu(); if (bookmarks != null) { // Add to status bar final JPanel commandPanel = SparkManager.getWorkspace().getStatusBar().getCommandPanel(); final RolloverButton bookmarkButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.BOOKMARK_ICON)); bookmarkButton.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent mouseEvent) { popup.show(bookmarkButton, mouseEvent.getX(), mouseEvent.getY()); } }); bookmarkButton.setToolTipText("View Bookmarks"); commandPanel.add(bookmarkButton); SparkManager.getWorkspace().getStatusBar().invalidate(); SparkManager.getWorkspace().getStatusBar().validate(); SparkManager.getWorkspace().getStatusBar().repaint(); Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); final Iterator bookmarkLinks = bookmarkedLinks.iterator(); while (bookmarkLinks.hasNext()) { final BookmarkedURL link = (BookmarkedURL)bookmarkLinks.next(); Action urlAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { try { BrowserLauncher.openURL(link.getURL()); } catch (IOException e) { Log.error(e); } } }; urlAction.putValue(Action.NAME, link.getName()); urlAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.LINK_16x16)); popup.add(urlAction); } final Iterator bookmarkConferences = bookmarkedConferences.iterator(); while (bookmarkConferences.hasNext()) { final BookmarkedConference conferences = (BookmarkedConference)bookmarkConferences.next(); Action conferenceAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { SwingWorker worker = new SwingWorker() { public Object construct() { try { Thread.sleep(10); } catch (InterruptedException e1) { Log.error(e1); } return "ok"; } public void finished() { ConferenceUtils.autoJoinConferenceRoom(conferences.getName(), conferences.getJid(), conferences.getPassword()); } }; worker.start(); } }; conferenceAction.putValue(Action.NAME, conferences.getName()); conferenceAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.CONFERENCE_IMAGE_16x16)); popup.add(conferenceAction); } } }
|
public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); final JPopupMenu popup = new JPopupMenu(); if (bookmarks != null) { // Add to status bar final JPanel commandPanel = SparkManager.getWorkspace().getStatusBar().getCommandPanel(); final RolloverButton bookmarkButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.BOOKMARK_ICON)); bookmarkButton.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent mouseEvent) { popup.show(bookmarkButton, mouseEvent.getX(), mouseEvent.getY()); } }); bookmarkButton.setToolTipText(Res.getString("title.view.bookmarks")); commandPanel.add(bookmarkButton); SparkManager.getWorkspace().getStatusBar().invalidate(); SparkManager.getWorkspace().getStatusBar().validate(); SparkManager.getWorkspace().getStatusBar().repaint(); Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); final Iterator bookmarkLinks = bookmarkedLinks.iterator(); while (bookmarkLinks.hasNext()) { final BookmarkedURL link = (BookmarkedURL)bookmarkLinks.next(); Action urlAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { try { BrowserLauncher.openURL(link.getURL()); } catch (IOException e) { Log.error(e); } } }; urlAction.putValue(Action.NAME, link.getName()); urlAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.LINK_16x16)); popup.add(urlAction); } final Iterator bookmarkConferences = bookmarkedConferences.iterator(); while (bookmarkConferences.hasNext()) { final BookmarkedConference conferences = (BookmarkedConference)bookmarkConferences.next(); Action conferenceAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { SwingWorker worker = new SwingWorker() { public Object construct() { try { Thread.sleep(10); } catch (InterruptedException e1) { Log.error(e1); } return "ok"; } public void finished() { ConferenceUtils.autoJoinConferenceRoom(conferences.getName(), conferences.getJid(), conferences.getPassword()); } }; worker.start(); } }; conferenceAction.putValue(Action.NAME, conferences.getName()); conferenceAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.CONFERENCE_IMAGE_16x16)); popup.add(conferenceAction); } } }
| 3,232,493
|
public int transform(int x) { int r = x; if (psCtx.IsConstant()) r = transformConstant(x); else r = transformNonConstant(x); return r; }
|
public int transform(int x) { int r = x; if (psCtx.IsConstant()) r = transformConstant(x); else r = transformNonConstant(x); return r; }
| 3,232,494
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); } bar.removeAll(); for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } for (int i = 0; i < existingMenus.length; i++) { bar.add(existingMenus[i]); } } else { for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } } }
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) existingMenus[i] = bar.getMenu(i); } bar.removeAll(); for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } for (int i = 0; i < existingMenus.length; i++) bar.add(existingMenus[i]); } } else { for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } } }
| 3,232,495
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); } bar.removeAll(); for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } for (int i = 0; i < existingMenus.length; i++) { bar.add(existingMenus[i]); } } else { for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } } }
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); bar.removeAll(); for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); for (int i = 0; i < existingMenus.length; i++) { bar.add(existingMenus[i]); else { for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); }
| 3,232,496
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); } bar.removeAll(); for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } for (int i = 0; i < existingMenus.length; i++) { bar.add(existingMenus[i]); } } else { for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } } }
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); } bar.removeAll(); for (int j = 0; j < menus.length; j++) bar.add(menus[j]); } for (int i = 0; i < existingMenus.length; i++) { bar.add(existingMenus[i]); } } else { for (int j = 0; j < menus.length; j++) bar.add(menus[j]); } } }
| 3,232,497
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); } bar.removeAll(); for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } for (int i = 0; i < existingMenus.length; i++) { bar.add(existingMenus[i]); } } else { for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } } }
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); } bar.removeAll(); for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } for (int i = 0; i < existingMenus.length; i++) { bar.add(existingMenus[i]); } } else { for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } } }
| 3,232,498
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); } bar.removeAll(); for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } for (int i = 0; i < existingMenus.length; i++) { bar.add(existingMenus[i]); } } else { for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } } }
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); bar.removeAll(); for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); for (int i = 0; i < existingMenus.length; i++) { bar.add(existingMenus[i]); else { for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); }
| 3,232,499
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); } bar.removeAll(); for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } for (int i = 0; i < existingMenus.length; i++) { bar.add(existingMenus[i]); } } else { for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } } }
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); } bar.removeAll(); for (int j = 0; j < menus.length; j++) bar.add(menus[j]); } for (int i = 0; i < existingMenus.length; i++) { bar.add(existingMenus[i]); } } else { for (int j = 0; j < menus.length; j++) bar.add(menus[j]); } } }
| 3,232,500
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); } bar.removeAll(); for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } for (int i = 0; i < existingMenus.length; i++) { bar.add(existingMenus[i]); } } else { for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); } } }
|
public void addToMenuBar(JMenu[] menus, boolean before) { JMenuBar bar = getJMenuBar(); if (before) { JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); bar.removeAll(); for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); for (int i = 0; i < existingMenus.length; i++) { bar.add(existingMenus[i]); else { for (int j = 0; j < menus.length; j++) { bar.add(menus[j]); }
| 3,232,501
|
private void createButtons() { buttons[CONNECT_BTN] = new JButton( iconManager.getIcon(IconManager.CONNECT_DS)); buttons[CONNECT_BTN].setToolTipText( UIUtilities.formatToolTipText("Connect to OMEDS.")); buttons[DISCONNECT_BTN] = new JButton( iconManager.getIcon(IconManager.DISCONNECT_DS)); buttons[DISCONNECT_BTN].setToolTipText( UIUtilities.formatToolTipText("Disconnect from OMEDS.")); buttons[HELP_BTN] = new JButton(iconManager.getIcon(IconManager.HELP)); buttons[HELP_BTN].setToolTipText( UIUtilities.formatToolTipText("Bring up help contents.")); buttons[EXIT_BTN] = new JButton(iconManager.getIcon(IconManager.EXIT)); buttons[EXIT_BTN].setToolTipText( UIUtilities.formatToolTipText("Exit the application.")); }
|
private void createButtons() { buttons[CONNECT_BTN] = new JButton( iconManager.getIcon(IconManager.CONNECT_DS)); buttons[CONNECT_BTN].setToolTipText( UIUtilities.formatToolTipText("Connect to OMEDS.")); buttons[DISCONNECT_BTN] = new JButton( iconManager.getIcon(IconManager.DISCONNECT_DS)); buttons[DISCONNECT_BTN].setToolTipText( UIUtilities.formatToolTipText("Disconnect from OMEDS.")); buttons[HELP_BTN] = new JButton(iconManager.getIcon(IconManager.HELP)); buttons[HELP_BTN].setToolTipText( UIUtilities.formatToolTipText("Bring up help contents.")); buttons[EXIT_BTN] = new JButton(iconManager.getIcon(IconManager.EXIT)); buttons[EXIT_BTN].setToolTipText( UIUtilities.formatToolTipText("Exit the application.")); }
| 3,232,502
|
private void createButtons() { buttons[CONNECT_BTN] = new JButton( iconManager.getIcon(IconManager.CONNECT_DS)); buttons[CONNECT_BTN].setToolTipText( UIUtilities.formatToolTipText("Connect to OMEDS.")); buttons[DISCONNECT_BTN] = new JButton( iconManager.getIcon(IconManager.DISCONNECT_DS)); buttons[DISCONNECT_BTN].setToolTipText( UIUtilities.formatToolTipText("Disconnect from OMEDS.")); buttons[HELP_BTN] = new JButton(iconManager.getIcon(IconManager.HELP)); buttons[HELP_BTN].setToolTipText( UIUtilities.formatToolTipText("Bring up help contents.")); buttons[EXIT_BTN] = new JButton(iconManager.getIcon(IconManager.EXIT)); buttons[EXIT_BTN].setToolTipText( UIUtilities.formatToolTipText("Exit the application.")); }
|
private void createButtons() { buttons[CONNECT_BTN] = new JButton( iconManager.getIcon(IconManager.CONNECT_DS)); buttons[CONNECT_BTN].setToolTipText( UIUtilities.formatToolTipText("Connect to OMEDS.")); buttons[DISCONNECT_BTN] = new JButton( iconManager.getIcon(IconManager.DISCONNECT_DS)); buttons[DISCONNECT_BTN].setToolTipText( UIUtilities.formatToolTipText("Disconnect from OMEDS.")); buttons[HELP_BTN] = new JButton(iconManager.getIcon(IconManager.HELP)); buttons[HELP_BTN].setToolTipText( UIUtilities.formatToolTipText("Bring up help contents.")); buttons[EXIT_BTN] = new JButton(iconManager.getIcon(IconManager.EXIT)); buttons[EXIT_BTN].setToolTipText( UIUtilities.formatToolTipText("Exit the application.")); }
| 3,232,503
|
private void createMenuItems() { buttons[EXIT_MI] = new JMenuItem("Exit", iconManager.getIcon(IconManager.EXIT)); buttons[CONNECT_MI] = new JMenuItem("Connect to OMEDS", iconManager.getIcon(IconManager.CONNECT_DS)); buttons[DISCONNECT_MI] = new JMenuItem("Disconnect from OMEDS", iconManager.getIcon(IconManager.DISCONNECT_DS)); buttons[WELCOME_MI] = new JMenuItem("Welcome...", iconManager.getIcon(IconManager.WELCOME)); buttons[HELP_MI] = new JMenuItem("Help Contents", iconManager.getIcon(IconManager.HELP)); buttons[HOWTO_MI] = new JMenuItem("How To...", iconManager.getIcon(IconManager.HOW_TO)); buttons[UPDATES_MI] = new JMenuItem("Software Updates", iconManager.getIcon(IconManager.SW_UPDATES)); buttons[ABOUT_MI] = new JMenuItem("About OME", IconManager.getOMEIcon()); buttons[COMMENT_MI] = new JMenuItem("Send Comment", iconManager.getIcon(IconManager.COMMENT)); }
|
private void createMenuItems() { buttons[EXIT_MI] = new JMenuItem("Exit", iconManager.getIcon(IconManager.EXIT)); buttons[CONNECT_MI] = new JMenuItem("Connect to OMEDS", iconManager.getIcon(IconManager.CONNECT_DS)); buttons[DISCONNECT_MI] = new JMenuItem("Disconnect from OMEDS", iconManager.getIcon(IconManager.DISCONNECT_DS)); buttons[WELCOME_MI] = new JMenuItem("Welcome...", iconManager.getIcon(IconManager.WELCOME)); buttons[HELP_MI] = new JMenuItem("Help Contents", iconManager.getIcon(IconManager.HELP)); buttons[HOWTO_MI] = new JMenuItem("How To...", iconManager.getIcon(IconManager.HOW_TO)); buttons[UPDATES_MI] = new JMenuItem("Software Updates", iconManager.getIcon(IconManager.SW_UPDATES)); buttons[ABOUT_MI] = new JMenuItem("About OME", IconManager.getOMEIcon()); buttons[COMMENT_MI] = new JMenuItem("Send Comment", iconManager.getIcon(IconManager.COMMENT)); }
| 3,232,504
|
public String getString() { return this.string; }
|
public String getString() { return value; }
| 3,232,505
|
public void setString(String string) { this.string = string; }
|
public void setString(String string) { this.string = string; }
| 3,232,506
|
public ModuleExecution(Integer moduleExecutionId, String status, Double attributeDbTime, boolean virtualMex, String inputTag, String iteratorTag, String dependence, Double attributeSortTime, String errorMessage, Date timestamp, Double attributeCreateTime, String newFeatureTag, Double totalTime, org.openmicroscopy.omero.model.Image image, org.openmicroscopy.omero.model.Dataset dataset, org.openmicroscopy.omero.model.Group group, org.openmicroscopy.omero.model.Experimenter experimenter, Set thumbnails, Set classifications, Set repositories, Set categories, Set displayRois, Set imageInfos, Set imagePlates, Set imagePixels, Set groups, Set experimenters, Set categoryGroups, Set imageAnnotations, Set datasetAnnotations, Set imageDimensions, Set channelComponents, Set displayOptions) { this.moduleExecutionId = moduleExecutionId; this.status = status; this.attributeDbTime = attributeDbTime; this.virtualMex = virtualMex; this.inputTag = inputTag; this.iteratorTag = iteratorTag; this.dependence = dependence; this.attributeSortTime = attributeSortTime; this.errorMessage = errorMessage; this.timestamp = timestamp; this.attributeCreateTime = attributeCreateTime; this.newFeatureTag = newFeatureTag; this.totalTime = totalTime; this.image = image; this.dataset = dataset; this.group = group; this.experimenter = experimenter; this.thumbnails = thumbnails; this.classifications = classifications; this.repositories = repositories; this.categories = categories; this.displayRois = displayRois; this.imageInfos = imageInfos; this.imagePlates = imagePlates; this.imagePixels = imagePixels; this.groups = groups; this.experimenters = experimenters; this.categoryGroups = categoryGroups; this.imageAnnotations = imageAnnotations; this.datasetAnnotations = datasetAnnotations; this.imageDimensions = imageDimensions; this.channelComponents = channelComponents; this.displayOptions = displayOptions; }
|
public ModuleExecution(Integer moduleExecutionId, String status, Double attributeDbTime, boolean virtualMex, String inputTag, String iteratorTag, String dependence, Double attributeSortTime, String errorMessage, Date timestamp, Double attributeCreateTime, String newFeatureTag, Double totalTime, org.openmicroscopy.omero.model.Image image, org.openmicroscopy.omero.model.Dataset dataset, org.openmicroscopy.omero.model.Group group, org.openmicroscopy.omero.model.Experimenter experimenter, Set thumbnails, Set classifications, Set repositories, Set categories, Set displayRois, Set imageInfos, Set imagePlates, Set imagePixels, Set groups, Set experimenters, Set categoryGroups, Set imageAnnotations, Set datasetAnnotations, Set imageDimensions, Set channelComponents, Set displayOptions) { this.moduleExecutionId = moduleExecutionId; this.status = status; this.attributeDbTime = attributeDbTime; this.virtualMex = virtualMex; this.inputTag = inputTag; this.iteratorTag = iteratorTag; this.dependence = dependence; this.attributeSortTime = attributeSortTime; this.errorMessage = errorMessage; this.timestamp = timestamp; this.attributeCreateTime = attributeCreateTime; this.newFeatureTag = newFeatureTag; this.totalTime = totalTime; this.image = image; this.dataset = dataset; this.group = group; this.experimenter = experimenter; this.thumbnails = thumbnails; this.classifications = classifications; this.repositories = repositories; this.categories = categories; this.displayRois = displayRois; this.imageInfos = imageInfos; this.imagePlates = imagePlates; this.imagePixels = imagePixels; this.groups = groups; this.experimenters = experimenters; this.categoryGroups = categoryGroups; this.imageAnnotations = imageAnnotations; this.datasetAnnotations = datasetAnnotations; this.imageDimensions = imageDimensions; this.channelComponents = channelComponents; this.displayOptions = displayOptions; }
| 3,232,507
|
public org.openmicroscopy.omero.model.Dataset getDataset() { return this.dataset; }
|
public Dataset getDataset() { return this.dataset; }
| 3,232,508
|
public org.openmicroscopy.omero.model.Experimenter getExperimenter() { return this.experimenter; }
|
public Experimenter getExperimenter() { return this.experimenter; }
| 3,232,509
|
public org.openmicroscopy.omero.model.Group getGroup() { return this.group; }
|
public Group getGroup() { return this.group; }
| 3,232,510
|
public org.openmicroscopy.omero.model.Image getImage() { return this.image; }
|
public Image getImage() { return this.image; }
| 3,232,511
|
public void setDataset(org.openmicroscopy.omero.model.Dataset dataset) { this.dataset = dataset; }
|
public void setDataset(Dataset dataset) { this.dataset = dataset; }
| 3,232,512
|
public void setExperimenter(org.openmicroscopy.omero.model.Experimenter experimenter) { this.experimenter = experimenter; }
|
public void setExperimenter(Experimenter experimenter) { this.experimenter = experimenter; }
| 3,232,513
|
public void setGroup(org.openmicroscopy.omero.model.Group group) { this.group = group; }
|
public void setGroup(Group group) { this.group = group; }
| 3,232,514
|
public void setImage(org.openmicroscopy.omero.model.Image image) { this.image = image; }
|
public void setImage(Image image) { this.image = image; }
| 3,232,515
|
public void setVirtualMex(boolean virtualMex) { this.virtualMex = virtualMex; }
|
public void setVirtualMex(Boolean virtualMex) { this.virtualMex = virtualMex; }
| 3,232,516
|
public void updateUserInputAttributes(List attributes) throws DSOutOfServiceException, DSAccessException;
|
public void updateUserInputAttributes(List attributes) throws DSOutOfServiceException, DSAccessException;
| 3,232,517
|
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { calendar.setTime(date); Iterator iter = compiledPattern.iterator(); while (iter.hasNext()) { Token token = (Token) iter.next(); switch (token.getFormat()) { case FORMAT_STRING: toAppendTo.append(token.getData()); break; case FORMAT_WEEK_LONG: toAppendTo.append(formatSymbols.getWeekdays()[calendar.get(Calendar.DAY_OF_WEEK)]); break; case FORMAT_WEEK_SHORT: toAppendTo.append(formatSymbols.getShortWeekdays()[calendar.get(Calendar.DAY_OF_WEEK)]); break; case FORMAT_MONTH_LONG: toAppendTo.append(formatSymbols.getMonths()[calendar.get(Calendar.MONTH)]); break; case FORMAT_MONTH_SHORT: toAppendTo.append(formatSymbols.getShortMonths()[calendar.get(Calendar.MONTH)]); break; case FORMAT_DAY: int value = calendar.get(Calendar.DAY_OF_MONTH); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_HOUR: value = calendar.get(Calendar.HOUR_OF_DAY); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_HOUR_M: value = calendar.get(Calendar.HOUR); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_DAY_YEAR: value = calendar.get(Calendar.DAY_OF_YEAR); if (value < 10) { toAppendTo.append("00"); } else if (value < 100) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_MINUTES: value = calendar.get(Calendar.MINUTE); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_MONTH: value = calendar.get(Calendar.MONTH) + 1; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_MERIDIAN: if (calendar.get(Calendar.AM_PM) == Calendar.AM) { toAppendTo.append("AM"); } else { toAppendTo.append("PM"); } break; case FORMAT_SECONDS: value = calendar.get(Calendar.SECOND); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_WEEK_YEAR_M: // GregorianCalendar uses Sunday by default; switch to Monday and back calendar.setFirstDayOfWeek(Calendar.MONDAY); // intentional fall-through case FORMAT_WEEK_YEAR_S: // Ruby uses zero-based weeks value = calendar.get(Calendar.WEEK_OF_YEAR) - 1; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); // to clear MONDAY from above calendar.setFirstDayOfWeek(Calendar.SUNDAY); break; case FORMAT_DAY_WEEK: value = calendar.get(Calendar.DAY_OF_WEEK) - 1; toAppendTo.append(value); break; case FORMAT_YEAR_LONG: value = calendar.get(Calendar.YEAR); if (value < 10) { toAppendTo.append("000"); } else if (value < 100) { toAppendTo.append("00"); } else if (value < 1000) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_YEAR_SHORT: value = calendar.get(Calendar.YEAR) % 100; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_ZONE_OFF: value = calendar.getTimeZone().getOffset(calendar.getTimeInMillis()); if (value < 0) { toAppendTo.append('+'); } else { toAppendTo.append('-'); } value = Math.abs(value); if (value / 3600000 < 10) { toAppendTo.append('0'); } toAppendTo.append(value / 3600000); value = value % 3600000 / 60000; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_ZONE_ID: toAppendTo.append(calendar.getTimeZone().getDisplayName(calendar.get(Calendar.DST_OFFSET) != 0, TimeZone.SHORT)); break; } } return toAppendTo; }
|
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { calendar.setTime(date); Iterator iter = compiledPattern.iterator(); while (iter.hasNext()) { Token token = (Token) iter.next(); switch (token.getFormat()) { case FORMAT_STRING: toAppendTo.append(token.getData()); break; case FORMAT_WEEK_LONG: toAppendTo.append(formatSymbols.getWeekdays()[calendar.get(Calendar.DAY_OF_WEEK)]); break; case FORMAT_WEEK_SHORT: toAppendTo.append(formatSymbols.getShortWeekdays()[calendar.get(Calendar.DAY_OF_WEEK)]); break; case FORMAT_MONTH_LONG: toAppendTo.append(formatSymbols.getMonths()[calendar.get(Calendar.MONTH)]); break; case FORMAT_MONTH_SHORT: toAppendTo.append(formatSymbols.getShortMonths()[calendar.get(Calendar.MONTH)]); break; case FORMAT_DAY: int value = calendar.get(Calendar.DAY_OF_MONTH); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_HOUR: value = calendar.get(Calendar.HOUR_OF_DAY); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_HOUR_M: value = calendar.get(Calendar.HOUR); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_DAY_YEAR: value = calendar.get(Calendar.DAY_OF_YEAR); if (value < 10) { toAppendTo.append("00"); } else if (value < 100) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_MINUTES: value = calendar.get(Calendar.MINUTE); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_MONTH: value = calendar.get(Calendar.MONTH) + 1; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_MERIDIAN: if (calendar.get(Calendar.AM_PM) == Calendar.AM) { toAppendTo.append("AM"); } else { toAppendTo.append("PM"); } break; case FORMAT_SECONDS: value = calendar.get(Calendar.SECOND); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_WEEK_YEAR_M: // GregorianCalendar uses Sunday by default; switch to Monday and back calendar.setFirstDayOfWeek(Calendar.MONDAY); // intentional fall-through case FORMAT_WEEK_YEAR_S: // Ruby uses zero-based weeks value = calendar.get(Calendar.WEEK_OF_YEAR) - 1; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); // to clear MONDAY from above calendar.setFirstDayOfWeek(Calendar.SUNDAY); break; case FORMAT_DAY_WEEK: value = calendar.get(Calendar.DAY_OF_WEEK) - 1; toAppendTo.append(value); break; case FORMAT_YEAR_LONG: value = calendar.get(Calendar.YEAR); if (value < 10) { toAppendTo.append("000"); } else if (value < 100) { toAppendTo.append("00"); } else if (value < 1000) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_YEAR_SHORT: value = calendar.get(Calendar.YEAR) % 100; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_ZONE_OFF: value = calendar.getTimeZone().getOffset(calendar.getTimeInMillis()); if (value < 0) { toAppendTo.append('+'); } else { toAppendTo.append('-'); } value = Math.abs(value); if (value / 3600000 < 10) { toAppendTo.append('0'); } toAppendTo.append(value / 3600000); value = value % 3600000 / 60000; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_ZONE_ID: toAppendTo.append(calendar.getTimeZone().getDisplayName(calendar.get(Calendar.DST_OFFSET) != 0, TimeZone.SHORT)); break; } } return toAppendTo; }
| 3,232,518
|
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { calendar.setTime(date); Iterator iter = compiledPattern.iterator(); while (iter.hasNext()) { Token token = (Token) iter.next(); switch (token.getFormat()) { case FORMAT_STRING: toAppendTo.append(token.getData()); break; case FORMAT_WEEK_LONG: toAppendTo.append(formatSymbols.getWeekdays()[calendar.get(Calendar.DAY_OF_WEEK)]); break; case FORMAT_WEEK_SHORT: toAppendTo.append(formatSymbols.getShortWeekdays()[calendar.get(Calendar.DAY_OF_WEEK)]); break; case FORMAT_MONTH_LONG: toAppendTo.append(formatSymbols.getMonths()[calendar.get(Calendar.MONTH)]); break; case FORMAT_MONTH_SHORT: toAppendTo.append(formatSymbols.getShortMonths()[calendar.get(Calendar.MONTH)]); break; case FORMAT_DAY: int value = calendar.get(Calendar.DAY_OF_MONTH); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_HOUR: value = calendar.get(Calendar.HOUR_OF_DAY); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_HOUR_M: value = calendar.get(Calendar.HOUR); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_DAY_YEAR: value = calendar.get(Calendar.DAY_OF_YEAR); if (value < 10) { toAppendTo.append("00"); } else if (value < 100) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_MINUTES: value = calendar.get(Calendar.MINUTE); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_MONTH: value = calendar.get(Calendar.MONTH) + 1; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_MERIDIAN: if (calendar.get(Calendar.AM_PM) == Calendar.AM) { toAppendTo.append("AM"); } else { toAppendTo.append("PM"); } break; case FORMAT_SECONDS: value = calendar.get(Calendar.SECOND); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_WEEK_YEAR_M: // GregorianCalendar uses Sunday by default; switch to Monday and back calendar.setFirstDayOfWeek(Calendar.MONDAY); // intentional fall-through case FORMAT_WEEK_YEAR_S: // Ruby uses zero-based weeks value = calendar.get(Calendar.WEEK_OF_YEAR) - 1; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); // to clear MONDAY from above calendar.setFirstDayOfWeek(Calendar.SUNDAY); break; case FORMAT_DAY_WEEK: value = calendar.get(Calendar.DAY_OF_WEEK) - 1; toAppendTo.append(value); break; case FORMAT_YEAR_LONG: value = calendar.get(Calendar.YEAR); if (value < 10) { toAppendTo.append("000"); } else if (value < 100) { toAppendTo.append("00"); } else if (value < 1000) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_YEAR_SHORT: value = calendar.get(Calendar.YEAR) % 100; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_ZONE_OFF: value = calendar.getTimeZone().getOffset(calendar.getTimeInMillis()); if (value < 0) { toAppendTo.append('+'); } else { toAppendTo.append('-'); } value = Math.abs(value); if (value / 3600000 < 10) { toAppendTo.append('0'); } toAppendTo.append(value / 3600000); value = value % 3600000 / 60000; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_ZONE_ID: toAppendTo.append(calendar.getTimeZone().getDisplayName(calendar.get(Calendar.DST_OFFSET) != 0, TimeZone.SHORT)); break; } } return toAppendTo; }
|
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { calendar.setTime(date); Iterator iter = compiledPattern.iterator(); while (iter.hasNext()) { Token token = (Token) iter.next(); switch (token.getFormat()) { case FORMAT_STRING: toAppendTo.append(token.getData()); break; case FORMAT_WEEK_LONG: toAppendTo.append(formatSymbols.getWeekdays()[calendar.get(Calendar.DAY_OF_WEEK)]); break; case FORMAT_WEEK_SHORT: toAppendTo.append(formatSymbols.getShortWeekdays()[calendar.get(Calendar.DAY_OF_WEEK)]); break; case FORMAT_MONTH_LONG: toAppendTo.append(formatSymbols.getMonths()[calendar.get(Calendar.MONTH)]); break; case FORMAT_MONTH_SHORT: toAppendTo.append(formatSymbols.getShortMonths()[calendar.get(Calendar.MONTH)]); break; case FORMAT_DAY: int value = calendar.get(Calendar.DAY_OF_MONTH); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_HOUR: value = calendar.get(Calendar.HOUR_OF_DAY); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_HOUR_M: value = calendar.get(Calendar.HOUR); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_DAY_YEAR: value = calendar.get(Calendar.DAY_OF_YEAR); if (value < 10) { toAppendTo.append("00"); } else if (value < 100) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_MINUTES: value = calendar.get(Calendar.MINUTE); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_MONTH: value = calendar.get(Calendar.MONTH) + 1; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_MERIDIAN: if (calendar.get(Calendar.AM_PM) == Calendar.AM) { toAppendTo.append("AM"); } else { toAppendTo.append("PM"); } break; case FORMAT_SECONDS: value = calendar.get(Calendar.SECOND); if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_WEEK_YEAR_M: // GregorianCalendar uses Sunday by default; switch to Monday and back calendar.setFirstDayOfWeek(Calendar.MONDAY); // intentional fall-through case FORMAT_WEEK_YEAR_S: // Ruby uses zero-based weeks value = calendar.get(Calendar.WEEK_OF_YEAR) - 1; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); // to clear MONDAY from above calendar.setFirstDayOfWeek(Calendar.SUNDAY); break; case FORMAT_DAY_WEEK: value = calendar.get(Calendar.DAY_OF_WEEK) - 1; toAppendTo.append(value); break; case FORMAT_YEAR_LONG: value = calendar.get(Calendar.YEAR); if (value < 10) { toAppendTo.append("000"); } else if (value < 100) { toAppendTo.append("00"); } else if (value < 1000) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_YEAR_SHORT: value = calendar.get(Calendar.YEAR) % 100; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_ZONE_OFF: value = calendar.getTimeZone().getOffset(calendar.getTimeInMillis()); if (value < 0) { toAppendTo.append('+'); } else { toAppendTo.append('-'); } value = Math.abs(value); if (value / 3600000 < 10) { toAppendTo.append('0'); } toAppendTo.append(value / 3600000); value = value % 3600000 / 60000; if (value < 10) { toAppendTo.append('0'); } toAppendTo.append(value); break; case FORMAT_ZONE_ID: toAppendTo.append(calendar.getTimeZone().getDisplayName(calendar.get(Calendar.DST_OFFSET) != 0, TimeZone.SHORT)); break; } } return toAppendTo; }
| 3,232,519
|
public final void setValue (Context context, Object newValue) throws PropertyException { if (!context.set(_names, newValue)) { throw new PropertyException("No method to set \"" + _vname + "\" to type " + ((newValue == null) ? "null" : newValue.getClass().toString()) + " in supplied context (" + context.getClass() + ")"); } }
|
public final void setValue (Context context, Object newValue) throws PropertyException { if (!context.set(_names, newValue)) { throw new PropertyException("No method to set \"" + getVariableName() + "\" to type " + ((newValue == null) ? "null" : newValue.getClass().toString()) + " in supplied context (" + context.getClass() + ")"); } }
| 3,232,520
|
public final String toString () { return "global:" + _vname; }
|
public final String toString () { return "global:" + getVariableName(); }
| 3,232,521
|
protected int compareValue(RubyNumeric other) { if (other instanceof RubyBignum) { return ((RubyBignum)other).compareValue(this) * -1; } else if (other instanceof RubyFloat) { double otherVal = other.getDoubleValue(); double thisVal = getDoubleValue(); return thisVal > otherVal ? 1 : thisVal < otherVal ? -1 : 0; } else { long otherVal = other.getLongValue(); return getValue() > otherVal ? 1 : getValue() < otherVal ? -1 : 0; } }
|
protected int compareValue(RubyNumeric other) { if (other instanceof RubyBignum) { return ((RubyBignum)other).compareValue(this) * -1; } else if (other instanceof RubyFloat) { double otherVal = other.getDoubleValue(); double thisVal = getDoubleValue(); return thisVal > otherVal ? 1 : thisVal < otherVal ? -1 : 0; } else { long otherVal = other.getLongValue(); return getLongValue() > otherVal ? 1 : getLongValue() < otherVal ? -1 : 0; } }
| 3,232,522
|
public static RubyFixnum newFixnum(Ruby ruby, long value) { // Cache for Fixnums (Performance) if ((value & ~Ruby.FIXNUM_CACHE_MAX) == 0) { return ruby.fixnumCache[(int) value]; } return new RubyFixnum(ruby, value); }
|
public static RubyFixnum newFixnum(Ruby ruby, long value) { // Cache for Fixnums (Performance) if ((value & ~Ruby.FIXNUM_CACHE_MAX) == 0) { RubyFixnum newNum = ruby.fixnumCache[(int) value]; if (newNum == null) { newNum = new RubyFixnum(ruby, value); ruby.fixnumCache[(int) value] = newNum; } return newNum; } else { return new RubyFixnum(ruby, value); } return new RubyFixnum(ruby, value); }
| 3,232,524
|
public static RubyFixnum newFixnum(Ruby ruby, long value) { // Cache for Fixnums (Performance) if ((value & ~Ruby.FIXNUM_CACHE_MAX) == 0) { return ruby.fixnumCache[(int) value]; } return new RubyFixnum(ruby, value); }
|
public static RubyFixnum newFixnum(Ruby ruby, long value) { // Cache for Fixnums (Performance) if ((value & ~Ruby.FIXNUM_CACHE_MAX) == 0) { return ruby.fixnumCache[(int) value]; } }
| 3,232,525
|
public RubyNumeric op_div(RubyObject num) { RubyNumeric other = numericValue(num); if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuby(), getDoubleValue()).op_div(other); } else if (other instanceof RubyBignum) { return RubyBignum.newBignum(getRuby(), getLongValue()).op_div(other); } else { return newFixnum(getRuby(), getValue() / other.getLongValue()); } }
|
public RubyNumeric op_div(RubyObject num) { RubyNumeric other = numericValue(num); if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuby(), getDoubleValue()).op_div(other); } else if (other instanceof RubyBignum) { return RubyBignum.newBignum(getRuby(), getLongValue()).op_div(other); } else { return newFixnum(getRuby(), getLongValue() / other.getLongValue()); } }
| 3,232,526
|
public RubyNumeric op_mod(RubyObject num) { RubyNumeric other = numericValue(num); if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuby(), getDoubleValue()).op_mod(other); } else if (other instanceof RubyBignum) { return RubyBignum.newBignum(getRuby(), getLongValue()).op_mod(other); } else { return newFixnum(getRuby(), getValue() % other.getLongValue()); } }
|
public RubyNumeric op_mod(RubyObject num) { RubyNumeric other = numericValue(num); if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuby(), getDoubleValue()).op_mod(other); } else if (other instanceof RubyBignum) { return RubyBignum.newBignum(getRuby(), getLongValue()).op_mod(other); } else { return newFixnum(getRuby(), getLongValue() % other.getLongValue()); } }
| 3,232,527
|
public RubyString to_s() { return RubyString.newString(getRuby(), String.valueOf(getValue())); }
|
public RubyString to_s() { return RubyString.newString(getRuby(), String.valueOf(getLongValue())); }
| 3,232,528
|
private JPanel buildAnnotationPanel() { JPanel p = new JPanel(); p.setBorder(new EtchedBorder()); p.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); // griddy constraints c.anchor = GridBagConstraints.NORTHWEST; c.fill = GridBagConstraints.BOTH; c.weighty = 1; c.insets = new Insets(3, 3, 3, 3); // add annotation area c.weightx = 0.4; p.add(new JScrollPane(annotationArea), c); // add annotated by list c.gridx = 1; c.weightx = 0.2; p.add(listComponent, c); return p; }
|
private JPanel buildAnnotationPanel() { JPanel p = new JPanel(); p.setBorder(new EtchedBorder()); p.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); // griddy constraints c.anchor = GridBagConstraints.NORTHWEST; c.fill = GridBagConstraints.BOTH; c.weighty = 1; c.insets = new Insets(3, 3, 3, 3); // add annotation area c.weightx = 0.4; p.add(new JScrollPane(annotationArea), c); // add annotated by list c.gridx = 1; c.weightx = 0.2; p.add(listComponent, c); return p; }
| 3,232,529
|
private JPanel buildCommentsPanel() { JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); p.add(new JLabel(TITLE)); p.add(messageComponent); return UIUtilities.buildComponentPanel(p); }
|
private JPanel buildCommentsPanel() { JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); p.add(new JLabel(TITLE)); p.add(messageComponent); return UIUtilities.buildComponentPanel(p); }
| 3,232,530
|
private void buildGUI() { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(buildCommentsPanel()); add(Box.createRigidArea(SMALL_V_SPACER_SIZE)); add(new JSeparator()); add(Box.createRigidArea(SMALL_V_SPACER_SIZE)); add(buildAnnotationPanel()); add(Box.createVerticalGlue()); }
|
private void buildGUI() { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(buildCommentsPanel()); add(Box.createRigidArea(SMALL_V_SPACER_SIZE)); add(new JSeparator()); add(Box.createRigidArea(SMALL_V_SPACER_SIZE)); add(buildAnnotationPanel()); add(Box.createVerticalGlue()); }
| 3,232,531
|
private void formatList(String[] objects) { // remove all users from list before adding new listModel.removeAllElements(); // add each user to list Timestamp date; DateFormat df = DateFormat.getDateInstance(); AnnotationData data; List list; for (int i = 0; i < objects.length; i++) { list = getDataObjectAnnotation(i); data = ((AnnotationData) list.get(0)); date = data.getLastModified(); if (date == null) date = new Timestamp(new Date().getTime());; listModel.addElement(objects[i]+" ("+df.format(date)+")"); } }
|
private void formatList(String[] objects) { // remove all users from list before adding new listModel.removeAllElements(); // add each user to list Timestamp date; DateFormat df = DateFormat.getDateInstance(); AnnotationData data; List list; for (int i = 0; i < objects.length; i++) { list = getDataObjectAnnotation(i); data = ((AnnotationData) list.get(0)); date = data.getLastModified(); if (date == null) date = new Timestamp(new Date().getTime());; listModel.addElement(objects[i]+" ("+df.format(date)+")"); } }
| 3,232,532
|
private void formatList(String[] objects) { // remove all users from list before adding new listModel.removeAllElements(); // add each user to list Timestamp date; DateFormat df = DateFormat.getDateInstance(); AnnotationData data; List list; for (int i = 0; i < objects.length; i++) { list = getDataObjectAnnotation(i); data = ((AnnotationData) list.get(0)); date = data.getLastModified(); if (date == null) date = new Timestamp(new Date().getTime());; listModel.addElement(objects[i]+" ("+df.format(date)+")"); } }
|
private void formatList(String[] objects) { // remove all users from list before adding new listModel.removeAllElements(); // add each user to list Timestamp date; DateFormat df = DateFormat.getDateInstance(); AnnotationData data; List list; for (int i = 0; i < objects.length; i++) { list = getDataObjectAnnotation(i); data = ((AnnotationData) list.get(0)); date = data.getLastModified(); if (date == null) date = new Timestamp(new Date().getTime());; listModel.addElement(objects[i]+" ("+df.format(date)+")"); } }
| 3,232,533
|
private List getDataObjectAnnotation(int index) { Map annotations = model.getAnnotations(); Long ownerID = (Long) annotatedMap.get(new Integer(index)); if (ownerID == null) return new ArrayList(); //empty list return (List) annotations.get(ownerID); }
|
private List getDataObjectAnnotation(int index) { Map annotations = model.getAnnotations(); Long ownerID = (Long) annotatedMap.get(new Integer(index)); if (ownerID == null) return new ArrayList(); //empty list return (List) annotations.get(ownerID); }
| 3,232,534
|
private void initComponents() { messageComponent = new JPanel(); messageComponent.setLayout(new BoxLayout(messageComponent, BoxLayout.Y_AXIS)); messageComponent.add(new JLabel(MESSAGE)); messageComponent.add(new JLabel(BODY)); messageComponent.setVisible(false); annotatedMap = new HashMap(); annotationArea = new MultilineLabel(); annotationArea.setBorder(new TitledBorder("Annotation")); annotationArea.setEditable(true); listModel = new DefaultListModel(); annotatedList = new JList(listModel); listComponent = new JScrollPane(annotatedList); listComponent.setVisible(false); annotatedList.setBorder(new TitledBorder("Annotated items")); annotatedList.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION); annotatedList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } } }); annotationArea.getDocument().addDocumentListener( new DocumentListener() { /** * Indicates that the object is annotated. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Indicates that the object is annotated. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }); }
|
private void initComponents() { messageComponent = new JPanel(); messageComponent.setLayout(new BoxLayout(messageComponent, BoxLayout.Y_AXIS)); messageComponent.add(new JLabel(MESSAGE)); messageComponent.add(new JLabel(BODY)); messageComponent.setVisible(false); annotatedMap = new HashMap(); annotationArea = new MultilineLabel(); annotationArea.setBorder(new TitledBorder("Annotation")); annotationArea.setEditable(true); listModel = new DefaultListModel(); annotatedList = new JList(listModel); listComponent = new JScrollPane(annotatedList); listComponent.setVisible(false); annotatedList.setBorder(new TitledBorder("Annotated items")); annotatedList.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION); annotatedList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } } }); annotationArea.getDocument().addDocumentListener( new DocumentListener() { /** * Indicates that the object is annotated. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Indicates that the object is annotated. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }); }
| 3,232,535
|
private void initComponents() { messageComponent = new JPanel(); messageComponent.setLayout(new BoxLayout(messageComponent, BoxLayout.Y_AXIS)); messageComponent.add(new JLabel(MESSAGE)); messageComponent.add(new JLabel(BODY)); messageComponent.setVisible(false); annotatedMap = new HashMap(); annotationArea = new MultilineLabel(); annotationArea.setBorder(new TitledBorder("Annotation")); annotationArea.setEditable(true); listModel = new DefaultListModel(); annotatedList = new JList(listModel); listComponent = new JScrollPane(annotatedList); listComponent.setVisible(false); annotatedList.setBorder(new TitledBorder("Annotated items")); annotatedList.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION); annotatedList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } } }); annotationArea.getDocument().addDocumentListener( new DocumentListener() { /** * Indicates that the object is annotated. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Indicates that the object is annotated. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }); }
|
private void initComponents() { messageComponent = new JPanel(); messageComponent.setLayout(new BoxLayout(messageComponent, BoxLayout.Y_AXIS)); messageComponent.add(new JLabel(MESSAGE)); messageComponent.add(new JLabel(BODY)); messageComponent.setVisible(false); annotatedMap = new HashMap(); annotationArea = new MultilineLabel(); annotationArea.setBorder(new TitledBorder("Annotation")); annotationArea.setEditable(true); listModel = new DefaultListModel(); annotatedList = new JList(listModel); listComponent = new JScrollPane(annotatedList); listComponent.setVisible(false); annotatedList.setBorder(new TitledBorder("Annotated items")); annotatedList.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION); annotatedList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } } }); annotationArea.getDocument().addDocumentListener( new DocumentListener() { /** * Indicates that the object is annotated. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Indicates that the object is annotated. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }); }
| 3,232,536
|
private void initComponents() { messageComponent = new JPanel(); messageComponent.setLayout(new BoxLayout(messageComponent, BoxLayout.Y_AXIS)); messageComponent.add(new JLabel(MESSAGE)); messageComponent.add(new JLabel(BODY)); messageComponent.setVisible(false); annotatedMap = new HashMap(); annotationArea = new MultilineLabel(); annotationArea.setBorder(new TitledBorder("Annotation")); annotationArea.setEditable(true); listModel = new DefaultListModel(); annotatedList = new JList(listModel); listComponent = new JScrollPane(annotatedList); listComponent.setVisible(false); annotatedList.setBorder(new TitledBorder("Annotated items")); annotatedList.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION); annotatedList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } } }); annotationArea.getDocument().addDocumentListener( new DocumentListener() { /** * Indicates that the object is annotated. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Indicates that the object is annotated. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }); }
|
private void initComponents() { messageComponent = new JPanel(); messageComponent.setLayout(new BoxLayout(messageComponent, BoxLayout.Y_AXIS)); messageComponent.add(new JLabel(MESSAGE)); messageComponent.add(new JLabel(BODY)); messageComponent.setVisible(false); annotatedMap = new HashMap(); annotationArea = new MultilineLabel(); annotationArea.setBorder(new TitledBorder("Annotation")); annotationArea.setEditable(true); listModel = new DefaultListModel(); annotatedList = new JList(listModel); listComponent = new JScrollPane(annotatedList); listComponent.setVisible(false); annotatedList.setBorder(new TitledBorder("Annotated items")); annotatedList.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION); annotatedList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } } }); annotationArea.getDocument().addDocumentListener( new DocumentListener() { /** * Indicates that the object is annotated. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Indicates that the object is annotated. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }); }
| 3,232,537
|
private void initComponents() { messageComponent = new JPanel(); messageComponent.setLayout(new BoxLayout(messageComponent, BoxLayout.Y_AXIS)); messageComponent.add(new JLabel(MESSAGE)); messageComponent.add(new JLabel(BODY)); messageComponent.setVisible(false); annotatedMap = new HashMap(); annotationArea = new MultilineLabel(); annotationArea.setBorder(new TitledBorder("Annotation")); annotationArea.setEditable(true); listModel = new DefaultListModel(); annotatedList = new JList(listModel); listComponent = new JScrollPane(annotatedList); listComponent.setVisible(false); annotatedList.setBorder(new TitledBorder("Annotated items")); annotatedList.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION); annotatedList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } } }); annotationArea.getDocument().addDocumentListener( new DocumentListener() { /** * Indicates that the object is annotated. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Indicates that the object is annotated. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }); }
|
private void initComponents() { messageComponent = new JPanel(); messageComponent.setLayout(new BoxLayout(messageComponent, BoxLayout.Y_AXIS)); messageComponent.add(new JLabel(MESSAGE)); messageComponent.add(new JLabel(BODY)); messageComponent.setVisible(false); annotatedMap = new HashMap(); annotationArea = new MultilineLabel(); annotationArea.setBorder(new TitledBorder("Annotation")); annotationArea.setEditable(true); listModel = new DefaultListModel(); annotatedList = new JList(listModel); listComponent = new JScrollPane(annotatedList); listComponent.setVisible(false); annotatedList.setBorder(new TitledBorder("Annotated items")); annotatedList.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION); annotatedList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } } }); annotationArea.getDocument().addDocumentListener( new DocumentListener() { /** * Indicates that the object is annotated. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Indicates that the object is annotated. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }); }
| 3,232,538
|
private void initComponents() { messageComponent = new JPanel(); messageComponent.setLayout(new BoxLayout(messageComponent, BoxLayout.Y_AXIS)); messageComponent.add(new JLabel(MESSAGE)); messageComponent.add(new JLabel(BODY)); messageComponent.setVisible(false); annotatedMap = new HashMap(); annotationArea = new MultilineLabel(); annotationArea.setBorder(new TitledBorder("Annotation")); annotationArea.setEditable(true); listModel = new DefaultListModel(); annotatedList = new JList(listModel); listComponent = new JScrollPane(annotatedList); listComponent.setVisible(false); annotatedList.setBorder(new TitledBorder("Annotated items")); annotatedList.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION); annotatedList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } } }); annotationArea.getDocument().addDocumentListener( new DocumentListener() { /** * Indicates that the object is annotated. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Indicates that the object is annotated. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }); }
|
private void initComponents() { messageComponent = new JPanel(); messageComponent.setLayout(new BoxLayout(messageComponent, BoxLayout.Y_AXIS)); messageComponent.add(new JLabel(MESSAGE)); messageComponent.add(new JLabel(BODY)); messageComponent.setVisible(false); annotatedMap = new HashMap(); annotationArea = new MultilineLabel(); annotationArea.setBorder(new TitledBorder("Annotation")); annotationArea.setEditable(true); listModel = new DefaultListModel(); annotatedList = new JList(listModel); listComponent = new JScrollPane(annotatedList); listComponent.setVisible(false); annotatedList.setBorder(new TitledBorder("Annotated items")); annotatedList.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION); annotatedList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } } }); annotationArea.getDocument().addDocumentListener( new DocumentListener() { /** * Indicates that the object is annotated. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Indicates that the object is annotated. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }); }
| 3,232,539
|
private void initComponents() { messageComponent = new JPanel(); messageComponent.setLayout(new BoxLayout(messageComponent, BoxLayout.Y_AXIS)); messageComponent.add(new JLabel(MESSAGE)); messageComponent.add(new JLabel(BODY)); messageComponent.setVisible(false); annotatedMap = new HashMap(); annotationArea = new MultilineLabel(); annotationArea.setBorder(new TitledBorder("Annotation")); annotationArea.setEditable(true); listModel = new DefaultListModel(); annotatedList = new JList(listModel); listComponent = new JScrollPane(annotatedList); listComponent.setVisible(false); annotatedList.setBorder(new TitledBorder("Annotated items")); annotatedList.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION); annotatedList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } } }); annotationArea.getDocument().addDocumentListener( new DocumentListener() { /** * Indicates that the object is annotated. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Indicates that the object is annotated. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }); }
|
private void initComponents() { messageComponent = new JPanel(); messageComponent.setLayout(new BoxLayout(messageComponent, BoxLayout.Y_AXIS)); messageComponent.add(new JLabel(MESSAGE)); messageComponent.add(new JLabel(BODY)); messageComponent.setVisible(false); annotatedMap = new HashMap(); annotationArea = new MultilineLabel(); annotationArea.setBorder(new TitledBorder("Annotation")); annotationArea.setEditable(true); listModel = new DefaultListModel(); annotatedList = new JList(listModel); listComponent = new JScrollPane(annotatedList); listComponent.setVisible(false); annotatedList.setBorder(new TitledBorder("Annotated items")); annotatedList.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION); annotatedList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } } }); annotationArea.getDocument().addDocumentListener( new DocumentListener() { /** * Indicates that the object is annotated. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Indicates that the object is annotated. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleAnnotationAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }); }
| 3,232,540
|
public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } }
|
public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { showSingleAnnotation(); } }
| 3,232,541
|
private void showSingleAnnotation() { int index = annotatedList.getSelectedIndex(); if (index == -1) return; List list = getDataObjectAnnotation(index); if (list.size() > 0) { AnnotationData data = (AnnotationData) list.get(0); annotationArea.setText(data.getText()); } }
|
private void showSingleAnnotation() { int index = annotatedList.getSelectedIndex(); if (index == -1) return; List list = getDataObjectAnnotation(index); if (list.size() > 0) { AnnotationData data = (AnnotationData) list.get(0); annotationArea.setText(data.getText()); } }
| 3,232,542
|
private JMenu createViewMenu() { JMenu menu = new JMenu("View"); menu.setMnemonic(KeyEvent.VK_V); //menu.add(new JMenuItem(controller.getAction(HiViewerControl.VIEW_PDI))); //menu.add(new JMenuItem( //s controller.getAction(HiViewerControl.VIEW_CGCI))); //menu.add(new JSeparator(JSeparator.HORIZONTAL)); JCheckBoxMenuItem item = new JCheckBoxMenuItem(); item.setSelected(false); item.setText(TreeViewAction.NAME); item.setAction(controller.getAction(HiViewerControl.TREE_VIEW)); //menu.add(item); item = new JCheckBoxMenuItem(); item.setSelected(true); item.setAction(controller.getAction(HiViewerControl.CLIPBOARD_VIEW)); item.setText(ClipBoardViewAction.NAME); //menu.add(item); item = new JCheckBoxMenuItem(); item.setSelected(model.isTitleBarVisible()); item.setAction(controller.getAction(HiViewerControl.SHOW_TITLEBAR)); menu.add(item); //item = new JCheckBoxMenuItem(); //item.setSelected(model.isRollOver()); //item.setAction(controller.getAction(HiViewerControl.ROLL_OVER)); //menu.add(item); menu.add(new JSeparator(SwingConstants.HORIZONTAL)); JMenuItem mi = new JMenuItem( controller.getAction(HiViewerControl.ZOOM_IN)); mi.setText(ZoomInAction.NAME); menu.add(mi); mi = new JMenuItem(controller.getAction(HiViewerControl.ZOOM_OUT)); mi.setText(ZoomOutAction.NAME); menu.add(mi); mi = new JMenuItem(controller.getAction(HiViewerControl.ZOOM_FIT)); mi.setText(ZoomFitAction.NAME); menu.add(mi); menu.add(new JSeparator(SwingConstants.HORIZONTAL)); menu.add(createLayoutMenu()); return menu; }
|
menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); private JMenu createViewMenu()menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); {menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); JMenu menu = new JMenu("View");menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.setMnemonic(KeyEvent.VK_V);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); //menu.add(new JMenuItem(controller.getAction(HiViewerControl.VIEW_PDI)));menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); //menu.add(new JMenuItem(menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); //smenu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); controller.getAction(HiViewerControl.VIEW_CGCI)));menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); //menu.add(new JSeparator(JSeparator.HORIZONTAL));menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); JCheckBoxMenuItem item = new JCheckBoxMenuItem();menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); item.setSelected(false);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); item.setText(TreeViewAction.NAME);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); item.setAction(controller.getAction(HiViewerControl.TREE_VIEW));menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); //menu.add(item);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); item = new JCheckBoxMenuItem();menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); item.setSelected(true);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); item.setAction(controller.getAction(HiViewerControl.CLIPBOARD_VIEW));menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); item.setText(ClipBoardViewAction.NAME);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); //menu.add(item);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); item = new JCheckBoxMenuItem();menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); item.setSelected(model.isTitleBarVisible());menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); item.setAction(controller.getAction(HiViewerControl.SHOW_TITLEBAR));menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(item);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); //item = new JCheckBoxMenuItem();menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); //item.setSelected(model.isRollOver());menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); //item.setAction(controller.getAction(HiViewerControl.ROLL_OVER));menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); //menu.add(item);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JSeparator(SwingConstants.HORIZONTAL));menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); JMenuItem mi = new JMenuItem(menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); controller.getAction(HiViewerControl.ZOOM_IN));menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); mi.setText(ZoomInAction.NAME);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(mi);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); mi = new JMenuItem(controller.getAction(HiViewerControl.ZOOM_OUT));menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); mi.setText(ZoomOutAction.NAME);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(mi);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); mi = new JMenuItem(controller.getAction(HiViewerControl.ZOOM_FIT));menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); mi.setText(ZoomFitAction.NAME);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(mi);menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JSeparator(SwingConstants.HORIZONTAL));menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(createLayoutMenu());menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); return menu;menu.add(new JMenuItem( controller.getAction(HiViewerControl.VIEW_CGCI))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); }
| 3,232,543
|
private BrowserDatasetData findDatasetData(int dsId) { // go through some silliness to find the BrowserDatasetData // that corresponds to ds. must look at _all_ datasets - not // just those currently being displayed Iterator iter = allDatasets.iterator(); BrowserDatasetData browserDataset = null; while (iter.hasNext()) { browserDataset = (BrowserDatasetData) iter.next(); System.err.println("looking at dataset ..."+browserDataset.getID()); if (browserDataset.getID() == dsId) { return browserDataset; } } return null; }
|
private BrowserDatasetData findDatasetData(int dsId) { // go through some silliness to find the BrowserDatasetData // that corresponds to ds. must look at _all_ datasets - not // just those currently being displayed Iterator iter = allDatasets.iterator(); BrowserDatasetData browserDataset = null; while (iter.hasNext()) { browserDataset = (BrowserDatasetData) iter.next(); System.err.println("looking at dataset ..."+browserDataset.getID()); if (browserDataset.getID() == dsId) { return browserDataset; } } return null; }
| 3,232,544
|
public void selectChainExecution(ChainExecutionData exec) { if (exec == null) { setSelectedDataset(null); return; } DatasetData ds = exec.getDataset(); int dsId = ds.getID(); System.err.println("selecting exec with ds ..."+dsId); DatasetNode n = null; BrowserDatasetData browserDataset = findDatasetData(dsId); if (browserDataset != null) n = browserDataset.getNode(); System.err.println("found dataset data.."+browserDataset); // make what I've found selected if (n != null) { // if it isn't displayed, display all if (n.getParent() != layer) doLayout(allDatasets); eventHandler.animateToNode(n); } setSelectedDataset(browserDataset); }
|
public void selectChainExecution(ChainExecutionData exec) { if (exec == null) { setSelectedDataset(null); return; } DatasetData ds = exec.getDataset(); int dsId = ds.getID(); System.err.println("selecting exec with ds ..."+dsId); DatasetNode n = null; BrowserDatasetData browserDataset = findDatasetData(dsId); if (browserDataset != null) n = browserDataset.getNode(); System.err.println("found dataset data.."+browserDataset); // make what I've found selected if (n != null) { // if it isn't displayed, display all if (n.getParent() != layer) doLayout(allDatasets); eventHandler.animateToNode(n); } setSelectedDataset(browserDataset); }
| 3,232,545
|
public void selectChainExecution(ChainExecutionData exec) { if (exec == null) { setSelectedDataset(null); return; } DatasetData ds = exec.getDataset(); int dsId = ds.getID(); System.err.println("selecting exec with ds ..."+dsId); DatasetNode n = null; BrowserDatasetData browserDataset = findDatasetData(dsId); if (browserDataset != null) n = browserDataset.getNode(); System.err.println("found dataset data.."+browserDataset); // make what I've found selected if (n != null) { // if it isn't displayed, display all if (n.getParent() != layer) doLayout(allDatasets); eventHandler.animateToNode(n); } setSelectedDataset(browserDataset); }
|
public void selectChainExecution(ChainExecutionData exec) { if (exec == null) { setSelectedDataset(null); return; } DatasetData ds = exec.getDataset(); int dsId = ds.getID(); System.err.println("selecting exec with ds ..."+dsId); DatasetNode n = null; BrowserDatasetData browserDataset = findDatasetData(dsId); if (browserDataset != null) n = browserDataset.getNode(); System.err.println("found dataset data.."+browserDataset); // make what I've found selected if (n != null) { // if it isn't displayed, display all if (n.getParent() != layer) doLayout(allDatasets); eventHandler.animateToNode(n); } setSelectedDataset(browserDataset); }
| 3,232,546
|
public void setSelectedDataset(BrowserDatasetData dataset) { // if they're the same, return // except for if it's null. then we might need to redraw if (dataset == selectedDataset && dataset != null) return; if (selectedDataset != null) selectedDataset.getNode().setHighlighted(false); if (dataset !=null) System.err.println("setting selected dataset .."+dataset.getID()); selectedDataset = dataset; // if a dataset is clicked on to be selected, it has already // told the canvas to draw to it. if (selectedDataset == null) { // selected is not null display it Collection datasetsToDisplay = allDatasets; displayDatasets(datasetsToDisplay); } mainWindow.setSelectedDataset(dataset); }
|
public void setSelectedDataset(BrowserDatasetData dataset) { // if they're the same, return // except for if it's null. then we might need to redraw if (dataset == selectedDataset && dataset != null) return; if (selectedDataset != null) selectedDataset.getNode().setHighlighted(false); if (dataset !=null) System.err.println("setting selected dataset .."+dataset.getID()); selectedDataset = dataset; // if a dataset is clicked on to be selected, it has already // told the canvas to draw to it. if (selectedDataset == null) { // selected is not null display it Collection datasetsToDisplay = allDatasets; displayDatasets(datasetsToDisplay); } mainWindow.setSelectedDataset(dataset); }
| 3,232,547
|
public void showRosterDialog(JFrame parent) { TitlePanel titlePanel = new TitlePanel(Res.getString("title.add.contact.group"), Res.getString("message.add.contact.to.list"), SparkRes.getImageIcon(SparkRes.USER1_32x32), true); JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); mainPanel.add(titlePanel, BorderLayout.NORTH); Object[] options = { Res.getString("add"), Res.getString("cancel") }; pane = new JOptionPane(panel, -1, 2, null, options, options[0]); mainPanel.add(pane, BorderLayout.CENTER); dialog = new JDialog(parent, Res.getString("title.add.contact"), true); dialog.pack(); dialog.setContentPane(mainPanel); dialog.setSize(350, 250); dialog.setLocationRelativeTo(parent); pane.addPropertyChangeListener(this); dialog.setVisible(true); dialog.toFront(); dialog.requestFocus(); jidField.requestFocus(); }
|
public void showRosterDialog(JFrame parent) { TitlePanel titlePanel = new TitlePanel(Res.getString("title.add.contact"), Res.getString("message.add.contact.to.list"), SparkRes.getImageIcon(SparkRes.USER1_32x32), true); JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); mainPanel.add(titlePanel, BorderLayout.NORTH); Object[] options = { Res.getString("add"), Res.getString("cancel") }; pane = new JOptionPane(panel, -1, 2, null, options, options[0]); mainPanel.add(pane, BorderLayout.CENTER); dialog = new JDialog(parent, Res.getString("title.add.contact"), true); dialog.pack(); dialog.setContentPane(mainPanel); dialog.setSize(350, 250); dialog.setLocationRelativeTo(parent); pane.addPropertyChangeListener(this); dialog.setVisible(true); dialog.toFront(); dialog.requestFocus(); jidField.requestFocus(); }
| 3,232,549
|
boolean isArchive() { if (!isFile()) { return false; } return pathname.endsWith(".jar") || pathname.endsWith(".zip") || pathname.endsWith(".war") || pathname.endsWith(".ear") || pathname.endsWith(".sar"); }
|
boolean isArchive() { if (!isFile()) { return false; } return pathname.endsWith(".jar") || pathname.endsWith(".zip") || pathname.endsWith(".war") || pathname.endsWith(".ear") || pathname.endsWith(".sar"); }
| 3,232,550
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.