コード例 #1
0
 private void setMarked(int rowIndex, final boolean marked) {
   final T element = myElements.get(rowIndex);
   final Boolean newValue = marked ? Boolean.TRUE : Boolean.FALSE;
   final Boolean prevValue = myMarkedMap.put(element, newValue);
   fireTableRowsUpdated(rowIndex, rowIndex);
   if (!newValue.equals(prevValue)) {
     notifyElementMarked(element, marked);
   }
 }
コード例 #2
0
 private static void saveState(TreeAction action, boolean state) {
   if (action instanceof PropertyOwner) {
     final String propertyName = ((PropertyOwner) action).getPropertyName();
     PropertiesComponent.getInstance()
         .setValue(getPropertyName(propertyName), Boolean.toString(state));
   }
 }
コード例 #3
0
  @Override
  public void dispose() {
    PropertiesComponent instance = PropertiesComponent.getInstance();
    instance.setValue(PROP_SORTED, Boolean.toString(isAlphabeticallySorted()));
    instance.setValue(PROP_SHOWCLASSES, Boolean.toString(myShowClasses));

    if (myCopyJavadocCheckbox != null) {
      instance.setValue(PROP_COPYJAVADOC, Boolean.toString(myCopyJavadocCheckbox.isSelected()));
    }

    final Container contentPane = getContentPane();
    if (contentPane != null) {
      contentPane.removeAll();
    }
    mySelectedNodes.clear();
    myElements = null;
    super.dispose();
  }
コード例 #4
0
 private void setMarked(int[] rows, final boolean marked) {
   if (rows == null || rows.length == 0) {
     return;
   }
   int firstRow = Integer.MAX_VALUE;
   int lastRow = Integer.MIN_VALUE;
   final Boolean newValue = marked ? Boolean.TRUE : Boolean.FALSE;
   for (final int row : rows) {
     final T element = myElements.get(row);
     final Boolean prevValue = myMarkedMap.put(element, newValue);
     if (!newValue.equals(prevValue)) {
       notifyElementMarked(element, newValue.booleanValue());
     }
     firstRow = Math.min(firstRow, row);
     lastRow = Math.max(lastRow, row);
   }
   fireTableRowsUpdated(firstRow, lastRow);
 }
コード例 #5
0
 private static void setToShowTextField(boolean toShowTextField) {
   PropertiesComponent.getInstance()
       .setValue(FILE_CHOOSER_SHOW_PATH_PROPERTY, Boolean.toString(toShowTextField));
 }
コード例 #6
0
 public boolean isElementMarked(int index) {
   final T element = myElements.get(index);
   final Boolean isMarked = myMarkedMap.get(element);
   return isMarked.booleanValue();
 }