Java 类com.intellij.ui.HoverHyperlinkLabel 实例源码

项目:intellij-ce-playground    文件:ValidatingTableEditor.java   
private void createUIComponents() {
  myTable = new ChangesTrackingTableView<Item>() {
    protected void onCellValueChanged(int row, int column, Object value) {
      final Item original = getItems().get(row);
      Item override = cloneOf(original);
      final ColumnInfo<Item, Object> columnInfo = getTableModel().getColumnInfos()[column];
      columnInfo.setValue(override, value);
      updateMessage(row, override);
    }

    @Override
    protected void onEditingStopped() {
      updateMessage(-1, null);
    }
  };

  myFixLink = new HoverHyperlinkLabel(null);
}
项目:tools-idea    文件:ValidatingTableEditor.java   
private void createUIComponents() {
  myTable = new ChangesTrackingTableView<Item>() {
    protected void onCellValueChanged(int row, int column, Object value) {
      final Item original = getItems().get(row);
      Item override = cloneOf(original);
      final ColumnInfo<Item, Object> columnInfo = getTableModel().getColumnInfos()[column];
      columnInfo.setValue(override, value);
      updateMessage(row, override);
    }

    @Override
    protected void onEditingStopped() {
      updateMessage(-1, null);
    }
  };

  myFixLink = new HoverHyperlinkLabel(null);
}
项目:nosql4idea    文件:ErrorPanel.java   
public ErrorPanel(final Exception ex) {
    setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
    JBLabel comp = new JBLabel("Error during query execution:");
    comp.setForeground(JBColor.RED);
    add(comp);
    final HoverHyperlinkLabel hoverHyperlinkLabel = new HoverHyperlinkLabel("more detail...");
    hoverHyperlinkLabel.addHyperlinkListener(new HyperlinkListener() {
        @Override
        public void hyperlinkUpdate(HyperlinkEvent hyperlinkEvent) {
            if (hyperlinkEvent.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                Messages.showErrorDialog(ex.toString(), "Error During Query Execution");
            }
        }
    });
    add(Box.createRigidArea(new Dimension(10, 10)));
    add(hoverHyperlinkLabel);

}
项目:consulo    文件:ValidatingTableEditor.java   
private void createUIComponents() {
  myTable = new ChangesTrackingTableView<Item>() {
    protected void onCellValueChanged(int row, int column, Object value) {
      final Item original = getItems().get(row);
      Item override = cloneOf(original);
      final ColumnInfo<Item, Object> columnInfo = getTableModel().getColumnInfos()[column];
      columnInfo.setValue(override, value);
      updateMessage(row, override);
    }

    @Override
    protected void onEditingStopped() {
      updateMessage(-1, null);
    }
  };

  myFixLink = new HoverHyperlinkLabel(null);
}
项目:educational-plugin    文件:StudyStepicUserWidget.java   
private void createUserPanel(@NotNull String statusText, @NotNull String actionLabelText, @NotNull HyperlinkAdapter listener) {
  int left_margin = 10;
  int top_margin = 6;
  int action_label_indent = 260;

  JPanel statusPanel = new JPanel(new BorderLayout());
  JLabel statusLabel = new JLabel(statusText);
  statusPanel.add(Box.createVerticalStrut(top_margin), BorderLayout.PAGE_START);
  statusPanel.add(Box.createHorizontalStrut(left_margin), BorderLayout.WEST);
  statusPanel.add(statusLabel, BorderLayout.CENTER);

  JPanel actionPanel = new JPanel(new BorderLayout());
  HoverHyperlinkLabel actionLabel = new HoverHyperlinkLabel(actionLabelText);
  actionLabel.addHyperlinkListener(listener);
  actionPanel.add(Box.createHorizontalStrut(action_label_indent), BorderLayout.LINE_START);
  actionPanel.add(actionLabel, BorderLayout.CENTER);
  actionPanel.add(Box.createHorizontalStrut(left_margin), BorderLayout.EAST);

  JPanel mainPanel = new JPanel();
  BoxLayout layout = new BoxLayout(mainPanel, BoxLayout.PAGE_AXIS);
  mainPanel.setLayout(layout);
  mainPanel.add(statusPanel);
  mainPanel.add(Box.createVerticalStrut(6));
  mainPanel.add(actionPanel);

  add(mainPanel, BorderLayout.PAGE_START);
}
项目:educational-plugin    文件:StepicStudyOptions.java   
public void createUIComponents() {
  myHoverHyperlinkLabel = new HoverHyperlinkLabel("");
}