Package javax.swing

Examples of javax.swing.Icon


              (SwingBundleDisplayer)super.addingService(sr);

            SwingUtilities.invokeLater(new Runnable() {
                public void run() {

                  Icon   icon = disp.getSmallIcon();

                  String  name =
                    Util.getStringProp(sr,
                                       SwingBundleDisplayer.PROP_NAME,
                                       disp.getClass().getName());
View Full Code Here


     */
    private TableCellRenderer getColorRenderer() {
      return new DefaultTableCellRenderer() {
        // A square icon filled with the foreground color of its component
        // and surrounded by table foreground color
        private Icon squareIcon = new Icon () {
          public int getIconHeight() {
            return getFont().getSize();
          }

          public int getIconWidth() {
View Full Code Here

        return;
      }

      c.setToolTipText(Util.bundleInfo(b));

      Icon icon = Util.getBundleIcon(b);

      c.setIcon(icon);

      c.invalidate();
      c.repaint();
View Full Code Here

    populate(items);
  }

  private void populate(final String[] items) {
    ActionListener listener;
    Icon adminIcon;
    Icon icon;
    String label;

    listener = new ActionSelectedCB();
    adminIcon = new AdminIcon();
View Full Code Here

    character.remove("last_player_kill_time");
    player.initialize(character);
   
    EntityView view = EntityViewFactory.create(player);
    // this if-block is there to be compatible with Stendhal 0.84 that is missing information
    Icon icon = null;
    if (view != null) {
      Image image = createCharacterImage(view);
      icon = new ImageIcon(image);
    }
   
View Full Code Here

   * @param column
   * @param size
   * @return the arrow icon
   */
  private Icon getHeaderRendererIcon(int column, int size) {
    Icon retVal = null;
    SortingState sortingState = tableModel.getSortingState();
    if(sortingState != null && (AbstractPdfSelectionTableModel.NOT_SORTED != sortingState.getSortType()) && (column == sortingState.getCol())){
      retVal = new Arrow(sortingState.getSortType() != AbstractPdfSelectionTableModel.DESCENDING, size);
    }
        return retVal;
View Full Code Here

        super.setRolloverIcon(rollover);
        super.setRolloverSelectedIcon(rolloverSelected);
    }

    private void resetIcons() {
        Icon icon = regIcons.get(ICON_NORMAL);
        if (null != icon) {
            setIcon(icon);
        }

        icon = regIcons.get(ICON_PRESSED);
View Full Code Here

            setDisabledSelectedIcon(icon);
        }
    }

    private Icon _getRolloverIcon() {
        Icon icon = null;
        icon = arrowIcons.get(mouseInArrowArea ? ICON_ROLLOVER : ICON_ROLLOVER_LINE);
        if (null == icon) {
            Icon orig = regIcons.get(ICON_ROLLOVER);
            if (null == orig) {
                orig = regIcons.get(ICON_NORMAL);
            }
            icon = new IconWithArrow(orig, !mouseInArrowArea);
            arrowIcons.put(mouseInArrowArea ? ICON_ROLLOVER : ICON_ROLLOVER_LINE, icon);
View Full Code Here

        }
        return icon;
    }

    private Icon _getRolloverSelectedIcon() {
        Icon icon = null;
        icon = arrowIcons.get(mouseInArrowArea ? ICON_ROLLOVER_SELECTED : ICON_ROLLOVER_SELECTED_LINE);
        if (null == icon) {
            Icon orig = regIcons.get(ICON_ROLLOVER_SELECTED);
            if (null == orig) {
                orig = regIcons.get(ICON_ROLLOVER);
            }
            if (null == orig) {
                orig = regIcons.get(ICON_NORMAL);
View Full Code Here

    }

    @Override
    public void setIcon(Icon icon) {
        assert null != icon;
        Icon arrow = updateIcons(icon, ICON_NORMAL);
        arrowIcons.remove(ICON_ROLLOVER_LINE);
        arrowIcons.remove(ICON_ROLLOVER_SELECTED_LINE);
        arrowIcons.remove(ICON_ROLLOVER);
        arrowIcons.remove(ICON_ROLLOVER_SELECTED);
        super.setIcon(hasPopupMenu() ? arrow : icon);
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.