nu.zoom.swing.desktop.Workbench.getErrorReporter()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(106)

本文整理了Java中nu.zoom.swing.desktop.Workbench.getErrorReporter()方法的一些代码示例,展示了Workbench.getErrorReporter()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Workbench.getErrorReporter()方法的具体详情如下:
包路径:nu.zoom.swing.desktop.Workbench
类名称:Workbench
方法名:getErrorReporter

Workbench.getErrorReporter介绍

暂无

代码示例

代码示例来源:origin: nu.zoom.svansprogram/svansprogram-error

@Override
public void reportError(String message) {
  workbench.getErrorReporter().reportError(message);
}

代码示例来源:origin: nu.zoom.svansprogram/svansprogram-error

@Override
public void reportError(String message, Exception e) {
  workbench.getErrorReporter().reportError(message, e);
}

代码示例来源:origin: nu.zoom.svansprogram/svansprogram-error

@Override
public void reportError(Exception e) {
  workbench.getErrorReporter().reportError(e);
}

代码示例来源:origin: nu.zoom/portunis

private void reconstructFrameContent() {
  try {
    frameMainPanel.removeAll();
    JComponent content = getFrameContent();
    frameMainPanel.add(content, BorderLayout.CENTER);
  } catch (KeyStoreException e) {
    workbench.getErrorReporter().reportError(e);
    frameMainPanel.add(new JLabel(e.getLocalizedMessage()),
        BorderLayout.CENTER);
  }
  frameMainPanel.revalidate();
}

代码示例来源:origin: nu.zoom/eon2

@SuppressWarnings("unchecked")
public void edit(
    ConnectionInformation connectionInformation,
    InitialLdapContext iCtx,
    Name name,
    Attribute attribute) {
  this.attributeID = attribute.getID();
  this.iCtx = iCtx;
  this.name = name;
  this.connectionInformation = connectionInformation;
  Vector values = new Vector();
  try {
    NamingEnumeration valueEnum = attribute.getAll();
    while (valueEnum.hasMore()) {
      Vector rowData = new Vector();
      rowData.add(valueEnum.next());
      values.add(rowData);
    }
    JDialog dlg = buildGUI(values);
    dlg.setVisible(true);
  } catch (NamingException e) {
    workbench.getErrorReporter().reportError(e);
  }
}

代码示例来源:origin: nu.zoom/eon2

private void complain(String messageKey) {
  workbench.getErrorReporter().reportError(
      messages.getMessage(messageKey));
}

代码示例来源:origin: nu.zoom/eon2

public void attributesChanged(Name name) {
  if (name.equals(dn)) {
    try {
      show(dn, iCtx.getAttributes(dn));
    } catch (NamingException e) {
      workbench.getErrorReporter().reportError(e);
    }
  }
}

代码示例来源:origin: nu.zoom/eon2

public void run() {
    try {
      model.resetModel(attributes);
    } catch (NamingException e) {
      workbench.getErrorReporter().reportError(
          messages.getMessage("error.attributes.show"),
          e);
    }
  }
});

代码示例来源:origin: nu.zoom/eon2

public void activate(DirectoryTree tree)
{
  try {
    DirectoryTreeObject[] selectedNames = tree.getSelectedNodes();
    if (selectedNames != null) {
      for (int i = 0; i < selectedNames.length; i++) {
        clipboard.addCut(selectedNames[i]);
      }
    }
  } catch (NamingException e) {
    workbench.getErrorReporter().reportError(e);
  }
}

代码示例来源:origin: nu.zoom/eon2

public void activate(DirectoryTree tree)
{
  try {
    DirectoryTreeObject selectedName = tree.getSelectedNode();
    if (selectedName != null) {
      clipboard.triggerPasteAction(selectedName);
    }
  } catch (Exception e) {
    workbench.getErrorReporter().reportError(e);
  }
}

代码示例来源:origin: nu.zoom/eon2

public void activate(DirectoryTree tree)
{
  try {
    DirectoryTreeObject[] selectedNames = tree.getSelectedNodes();
    if (selectedNames != null) {
      for (int i = 0; i < selectedNames.length; i++) {
        clipboard.addCopy(selectedNames[i]);
      }
    }
  } catch (NamingException e) {
    workbench.getErrorReporter().reportError(e);
  }
}

代码示例来源:origin: nu.zoom/eon2

private void editSelectedAttribute() {
  Attribute attr = getSelectedAttribute();
  if (attr != null) {
    try {
      AttributeEditor editor = editorFactory.getEditor(attr);
      editor.edit(connectionInformation, iCtx, dn, attr);
    } catch (NamingException e) {
      workbench.getErrorReporter().reportError(e);
    }
  } else {
    workbench.getErrorReporter().reportError(
        messages.getMessage("attributes.noselected"));
  }
}

代码示例来源:origin: nu.zoom/portunis

synchronized void displayKeyStore(KeyStoreWrapper wrapper) {
  WorkbenchFrame frame = keyStoreWorkbenchFrames
      .get(wrapper);
  if (frame != null) {
    frame.moveToFront();
  } else {
    KeyStoreFrame factory = new KeyStoreFrame(this, keyStoreHandler,
        prefs, wrapper, messages, workbench);
    try {
      frame = factory.getWorkbenchFrame();
      frame.addFrameListener(this);
      keyStoreWorkbenchFrames.put(wrapper, frame);
    } catch (Exception e) {
      workbench.getErrorReporter().reportError(e);
    }
  }
}

代码示例来源:origin: nu.zoom/svansprogram

public boolean openManager() {
  final FileChooser fileChooser = fileChooserFactory.getFileChooser(PreferencesUtil.MANAGER_FILECHOOSER_PREFS_KEY);
  File openFile = fileChooser.openFile();
  if (openFile != null) {
    try {
      final boolean success = loadManager(openFile.getCanonicalPath());
      if (success) {
        fireStyleRulesManagerChanged();
      }
      return success;
    } catch (IOException ex) {
      try {
        String message = localizedResources.getMessage("nu.zoom.catonine.configurations.load.failed");
        workbench.getErrorReporter().reportError(message, ex);
      } catch (ResourceNotFoundException ex1) {
        workbench.getErrorReporter().reportError("Unable to load resource", ex);
      }
    }
  }
  return false;
}

代码示例来源:origin: nu.zoom/eon2

public void actionPerformed(ActionEvent e) {
  ConnectionEditor editor = connectionFactory.getEditor();
  if (editor == null) {
    workbench.getErrorReporter().reportError(
        messages.getMessage("connection.error.noeditor"));
  } else {
    JComponent editorComponent = editor.editConnection(connection);
    if (editorComponent == null) {
      workbench.getErrorReporter().reportError(
          messages.getMessage("connection.error.noeditor"));
    } else {
      WorkbenchFrame frame = workbench.createWorkbenchFrame(this
          .getClass().getName(), editorComponent, true, true);
      frame.setTitle(messages.getMessage("connection.edit.title"));
      frame.setVisible(true);
    }
  }
}

代码示例来源:origin: nu.zoom.svansprogram/svansprogram-gui

@Override
protected void setAttachedLook() {
  try {
    setName(messages.getMessage("menu.window.detach"));
    setToolTip(messages
        .getMessage("menu.window.detach.tooltip"));
  } catch (ResourceNotFoundException ex) {
    workbench.getErrorReporter().reportError(ex);
  }
}

代码示例来源:origin: nu.zoom/portunis

public void actionPerformed(ActionEvent e)
{
  try {
    if (!saveAs && (wrapper.getFile() != null)) {
      save();
    } else {
      saveAs();
    }
  } catch (Exception exc) {
    workbench.getErrorReporter().reportError(
        messages.getMessage("keystore.menu.save.error"), exc);
  }
}

代码示例来源:origin: nu.zoom/eon2

public void run(Operation operation) {
    manager.operationStarting(this);
    try {
      operation.execute();
    } catch (Exception e) {
      manager.operationFinished(this);
      workbench.getErrorReporter().reportError(
          messages.getMessage("operation.error"),
          e);
    }
    manager.operationFinished(this);
  }
}

代码示例来源:origin: nu.zoom/portunis

synchronized void loadKeystore(File keystoreFile, KeyStoreType type,
    char[] password) throws KeyStoreException,
    NoSuchAlgorithmException, CertificateException,
    FileNotFoundException, IOException {
  if (!keystoreFile.canRead()) {
    workbench.getErrorReporter().reportError(
        messages.getMessage("keystore.load.unreadable"));
  } else {
    KeyStoreWrapper loadedStore = keyStoreHandler.loadKeyStore(
        keystoreFile, type, password);
    loadedKeyStoreMenu.removeAll();
    KeyStoreWrapper[] stores = keyStoreHandler.getLoadedKeyStores();
    if ((stores != null) && (stores.length > 0)) {
      loadedKeyStoreMenu.setEnabled(true);
      for (int i = 0; i < stores.length; i++) {
        loadedKeyStoreMenu.add(new DisplayKeyStoreAction(this,
            messages, stores[i]));
      }
      displayKeyStore(loadedStore);
    } else {
      loadedKeyStoreMenu.setEnabled(false);
    }
  }
}

代码示例来源:origin: nu.zoom/eon2

public void actionPerformed(ActionEvent e) {
  try {
    connectionFactory.removeConnection(connection);
    workbench.setStatusbarMessage(messages.format("connection.deleted",
        connection.getDescription()));
  } catch (BackendException exc) {
    workbench.getErrorReporter().reportError(
        messages.format("connection.error.backend", exc
            .getLocalizedMessage()));
  }
}

相关文章