Beispiel #1
0
 @Override
 public void mouseMoved(MouseEvent e) {
   JTable table = (JTable) e.getSource();
   Object tag = getTagAt(e);
   if (tag == myTag) {
     table.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
   } else {
     table.setCursor(Cursor.getDefaultCursor());
   }
 }
Beispiel #2
0
    @Nullable
    private SvnFileRevision getSelectedRevision(final MouseEvent e) {
      JTable table = (JTable) e.getSource();
      int row = table.rowAtPoint(e.getPoint());
      int column = table.columnAtPoint(e.getPoint());

      final Object value = table.getModel().getValueAt(row, column);
      if (value instanceof RevisionMergeSourceInfo) {
        return ((RevisionMergeSourceInfo) value).getRevision();
      }
      return null;
    }
Beispiel #3
0
 private void appendMergeSourceText(JTable table, int row, int column, @Nullable String text) {
   if (StringUtil.isEmpty(text)) {
     append("", SimpleTextAttributes.REGULAR_ATTRIBUTES);
   } else {
     append(
         cutString(text, table.getCellRect(row, column, false).getWidth()),
         SimpleTextAttributes.REGULAR_ATTRIBUTES,
         MERGE_SOURCE_DETAILS_TAG);
   }
 }