Package javax.swing

Examples of javax.swing.Icon


    }
    return menu;
  }

  public static JMenuItem createMenuItem(String text, String iconPath) {
    Icon icon = null;
    if (iconPath != null) {
      icon = ImageManager.getInstance().getImageIcon(iconPath);
    }
    return createMenuItem(text, icon);
  }
View Full Code Here


      value = ((DefaultMutableTreeNode) value).getUserObject();
    }

    Component component = null;
    ImageManager imageManager = ImageManager.getInstance();
    Icon icon = null;

    if (value instanceof Datastore) {
      component = _rendererDelegate.getTreeCellRendererComponent(tree, ((Datastore) value).getName(), selected,
          expanded, leaf, row, hasFocus);
      icon = IconUtils.getDatastoreIcon((Datastore) value, IconUtils.ICON_SIZE_SMALL);
View Full Code Here

    _listPanel.removeAll();

    final String[] names = _catalog.getStringPatternNames();
    Arrays.sort(names);

    final Icon icon = imageManager.getImageIcon("images/model/stringpattern.png");

    for (final String name : names) {
      final StringPattern stringPattern = _catalog.getStringPattern(name);

      final DCLabel stringPatternLabel = DCLabel.dark("<html><b>" + name + "</b><br/>" + getDescription(stringPattern)
View Full Code Here

    _listPanel.removeAll();

    final String[] names = _catalog.getDictionaryNames();
    Arrays.sort(names);

    final Icon icon = imageManager.getImageIcon(IconUtils.DICTIONARY_IMAGEPATH);

    for (final String name : names) {
      final Dictionary dictionary = _catalog.getDictionary(name);

      final DCLabel dictLabel = DCLabel
View Full Code Here

    add(WidgetUtils.scrolleable(_taskPaneContainer), BorderLayout.CENTER);
  }

  public void addResult(final AnalyzerJob analyzerJob, final AnalyzerResult result) {
    final AnalyzerBeanDescriptor<?> descriptor = analyzerJob.getDescriptor();
    final Icon icon = IconUtils.getDescriptorIcon(descriptor, IconUtils.ICON_SIZE_LARGE);

    final String resultLabel = LabelUtils.getLabel(analyzerJob);

    final JXTaskPane taskPane = WidgetFactory.createTaskPane(resultLabel, icon);
View Full Code Here

    final TableModel tableModel = new DefaultTableModel(new String[] { "", "Database", "Driver class", "Installed?",
        "Used?" }, databaseDrivers.size());

    final DCTable table = new DCTable(tableModel);

    final Icon validIcon = imageManager.getImageIcon("images/status/valid.png", IconUtils.ICON_SIZE_SMALL);
    final Icon invalidIcon = imageManager.getImageIcon("images/status/error.png", IconUtils.ICON_SIZE_SMALL);

    final int installedCol = 3;
    final int usedCol = 4;
    int row = 0;
    for (final DatabaseDriverDescriptor dd : databaseDrivers) {
      final String driverClassName = dd.getDriverClassName();
      final String displayName = dd.getDisplayName();

      final Icon driverIcon = imageManager.getImageIcon(DatabaseDriverCatalog.getIconImagePath(dd),
          IconUtils.ICON_SIZE_SMALL);

      tableModel.setValueAt(driverIcon, row, 0);
      tableModel.setValueAt(displayName, row, 1);
      tableModel.setValueAt(driverClassName, row, 2);
View Full Code Here

      result.setText(getNullText());
    } else if (value instanceof NamedStructure) {
      result.setText(((NamedStructure) value).getName());

      int indent = 0;
      Icon icon = null;
      if (value instanceof Schema) {
        icon = imageManager.getImageIcon("images/model/schema.png", IconUtils.ICON_SIZE_SMALL);
        if (SchemaComparator.isInformationSchema((Schema) value)) {
          icon = imageManager.getImageIcon("images/model/schema_information.png", IconUtils.ICON_SIZE_SMALL);
        } else {
View Full Code Here

      _panel.updateUI();
    }
  }

  protected List<JMenuItem> getCopyMenuItems() {
    Icon icon = ImageManager.getInstance().getImageIcon("images/actions/copy.png");
    List<JMenuItem> result = new ArrayList<JMenuItem>();

    // JMenuItem for "Copy selected cells to clipboard"
    JMenuItem copySelectedItem = new JMenuItem("Copy selected cells to clipboard", icon);
    copySelectedItem.addActionListener(_copySelectItemsActionListener);
View Full Code Here

  }

  private void updateComponents() {
    TableModel model = new DefaultTableModel(headers, _columns.size());
    int i = 0;
    Icon icon = imageManager.getImageIcon("images/model/column.png", IconUtils.ICON_SIZE_SMALL);
    for (final InputColumn<?> column : _columns) {
      if (column instanceof MutableInputColumn<?>) {
        final JXTextField textField = WidgetFactory.createTextField("Column name");
        textField.setText(column.getName());
        final MutableInputColumn<?> mutableInputColumn = (MutableInputColumn<?>) column;
View Full Code Here

    _windowContext = windowContext;
    _injectorBuilder = injectorBuilder;

    setOpaque(false);

    final Icon icon = IconUtils.getDatastoreIcon(datastore);
    final String description = getDescription(datastore);

    _checkBox = new JCheckBox();
    _checkBox.setOpaque(false);
    _checkBox.addActionListener(new ActionListener() {
View Full Code Here

TOP

Related Classes of javax.swing.Icon

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.