コード例 #1
0
    protected void customizeCellRenderer(
        final JTable table,
        final Object value,
        final boolean selected,
        final boolean hasFocus,
        final int row,
        final int column) {
      if (myListener == null) {
        myListener = new MergeSourceDetailsLinkListener(MERGE_SOURCE_DETAILS_TAG, myFile);
        myListener.install(table);
      }
      if (!(value instanceof SvnFileRevision)) {
        append("", SimpleTextAttributes.REGULAR_ATTRIBUTES);
        return;
      }
      final SvnFileRevision revision = (SvnFileRevision) value;
      final String text = getText(revision);
      if (text.length() == 0) {
        append("", SimpleTextAttributes.REGULAR_ATTRIBUTES);
        return;
      }

      append(
          cutString(text, table.getCellRect(row, column, false).getWidth()),
          SimpleTextAttributes.REGULAR_ATTRIBUTES);
    }
コード例 #2
0
 @Override
 protected void customizeCellRenderer(
     final JTable table,
     final Object value,
     final boolean selected,
     final boolean hasFocus,
     final int row,
     final int column) {
   if (myListener == null) {
     myListener = new MergeSourceDetailsLinkListener(MERGE_SOURCE_DETAILS_TAG, myFile);
     myListener.installOn(table);
   }
   appendMergeSourceText(
       table, row, column, value instanceof RevisionMergeSourceInfo ? value.toString() : null);
 }