Beispiel #1
0
 /** @see org.tramper.gui.viewer.Viewer#last() */
 public void last() {
   int maxRowView = feedTable.getModel().getRowCount();
   feedTable.changeSelection(maxRowView - 1, 0, false, false);
   int maxRowModel = feedTable.convertRowIndexToModel(maxRowView);
   document.setIndex(maxRowModel - 1);
   FeedItem selectedItem = document.getItem(maxRowModel - 1);
   String displayableItem = renderFeedItem(selectedItem);
   feedItemDetail.setText(displayableItem);
 }
Beispiel #2
0
 /** @see org.tramper.gui.viewer.Viewer#previous() */
 public void previous() {
   int selectedRowView = feedTable.getSelectedRow();
   feedTable.changeSelection(selectedRowView - 1, 0, false, false);
   int selectedRowModel = feedTable.convertRowIndexToModel(selectedRowView);
   document.setIndex(selectedRowModel - 1);
   FeedItem selectedItem = document.getItem(selectedRowModel - 1);
   String displayableItem = renderFeedItem(selectedItem);
   feedItemDetail.setText(displayableItem);
 }
Beispiel #3
0
 /** @see org.tramper.gui.viewer.Viewer#first() */
 public void first() {
   int minRowView = 0;
   feedTable.changeSelection(minRowView, 0, false, false);
   int minRowModel = feedTable.convertRowIndexToModel(minRowView);
   document.setIndex(minRowModel);
   FeedItem selectedItem = document.getItem(minRowModel);
   String displayableItem = renderFeedItem(selectedItem);
   feedItemDetail.setText(displayableItem);
 }
Beispiel #4
0
 public void mousePressed(MouseEvent e) {
   int clickedButton = e.getButton();
   if (clickedButton == MouseEvent.BUTTON1) {
     Library.getInstance().setActiveDocument(target);
     int selectedRowView = feedTable.getSelectedRow();
     int selectedRowModel = feedTable.convertRowIndexToModel(selectedRowView);
     document.setIndex(selectedRowModel);
     FeedItem selectedItem = document.getItem(selectedRowModel);
     String displayableItem = renderFeedItem(selectedItem);
     feedItemDetail.setText(displayableItem);
   }
 }
Beispiel #5
0
 public void keyReleased(KeyEvent e) {
   int keyCode = e.getKeyCode();
   if (keyCode == KeyEvent.VK_UP
       || keyCode == KeyEvent.VK_DOWN
       || keyCode == KeyEvent.VK_PAGE_DOWN
       || keyCode == KeyEvent.VK_PAGE_UP) {
     int selectedRowView = feedTable.getSelectedRow();
     int selectedRowModel = feedTable.convertRowIndexToModel(selectedRowView);
     document.setIndex(selectedRowModel);
     FeedItem selectedItem = document.getItem(selectedRowModel);
     String displayableItem = renderFeedItem(selectedItem);
     feedItemDetail.setText(displayableItem);
   }
 }