Examples of Icon


Examples of javax.swing.Icon

      }
      final LinkedHashMap commonActions=pactions;
      Iterator it=commonActions.keySet().iterator();
      while(it.hasNext()){
        final String actionName =(String)it.next();
        Icon icon =(commonActions.get(actionName) instanceof Icon)(Icon)commonActions.get(actionName) : null;
        JMenuItem jmi = ActionPopup.createMenuItem(menu, actionName, icon);
        jmi.addActionListener(new CollectiveActionListener(x, y, getSelectedSource(), actionName))
      }
      return true;
    }
View Full Code Here

Examples of javax.swing.Icon

  class FlagTableCellRenderer extends ServerListTableCellRenderer {
    public Component getTableCellRendererComponent(JTable table, Object value,
        boolean isSelected, boolean hasFocus, int row, int column) {
      super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
      this.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
      Icon flag_icon = FlagPack.getFlagAsIconByIP(server.getAddress(), FlagPack.FlagSize.S25x15);
      if( flag_icon != null ) this.setIcon(flag_icon);
      if( !country_locator.isServiceDown() )
         this.setToolTipText(country_locator.getCountryName(server.getAddress()));
      return this;
    }
View Full Code Here

Examples of javax.swing.Icon

 
  class FlagTableCellRenderer extends DownloadPeersTableCellRenderer {
    public Component getTableCellRendererComponent(JTable table, Object value,
        boolean isSelected, boolean hasFocus, int row, int column) {
      super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
      Icon flag_icon = FlagPack.getFlagAsIconByIP(peer.getIP(), FlagPack.FlagSize.S18x25);
      this.setHorizontalAlignment(SwingConstants.CENTER);
      if( flag_icon != null ) this.setIcon(flag_icon);
      if( !country_locator.isServiceDown() )
         this.setToolTipText(country_locator.getCountryName(peer.getIP()));
      return this;
View Full Code Here

Examples of javax.swing.Icon

    /**
     * Get a node icon according to the graph object class name
     */
    public static Icon getIcon(Object graphObject){
        if(graphObject==null) return null; // root node
        Icon res=_icons.get(graphObject.getClass().getName());
        if(res==null){
            // look for sub types
            Class<?> c=graphObject.getClass().getSuperclass();
            while(c!=Object.class){
                res=_icons.get(c.getName());
View Full Code Here

Examples of javax.swing.Icon

        return (Icon)buttonIconHashmap.get(CANCEL_BUTTON_ICON_PROPERTY);
    }
   
    void setCancelButtonIcon(Icon newIcon) {
       
        Icon oldIcon = getCancelButtonIcon();       
        if (!newIcon.equals(oldIcon)) {
            buttonIconHashmap.put(CANCEL_BUTTON_ICON_PROPERTY, newIcon);
            firePropertyChange(CANCEL_BUTTON_ICON_PROPERTY, oldIcon, newIcon);
        }
    }
View Full Code Here

Examples of net.minecraft.src.Icon

      tessellator = null;
    }
  }

  private static void setupTileCoords(int face) {
    Icon icon = icons[face];
    tessellator = TessellatorUtils.getTessellator(Tessellator.instance, icons[face]);
    u0 = (double)icon.getMinU();
    uM = (double)icon.getInterpolatedU(8.0D);
    u1 = (double)icon.getMaxU();
    v0 = (double)icon.getMinV();
    v1 = (double)icon.getMaxV();
  }
View Full Code Here

Examples of net.minecraft.util.Icon

      if(renderer.renderAllFaces || renderTop)
      {
        rendered = true;

        Icon icon = block.getIcon(1, bMeta);
        float flowDir = (float) BlockFluidRoot.getFlowDirection(world, x, y, z);

        if(flowDir > -999.0F)
        {
          icon = block.getIcon(2, bMeta);
        }

        d2 -= d6;
        d3 -= d6;
        d4 -= d6;
        d5 -= d6;
        double d7;
        double d8;
        double d9;
        double d10;
        double d11;
        double d12;
        double d13;
        double d14;

        if(flowDir < -999.0F)
        {
          d8 = icon.getInterpolatedU(0.0D);
          d12 = icon.getInterpolatedV(0.0D);
          d7 = d8;
          d11 = icon.getInterpolatedV(16.0D);
          d10 = icon.getInterpolatedU(16.0D);
          d14 = d11;
          d9 = d10;
          d13 = d12;
        }
        else
        {
          f8 = MathHelper.sin(flowDir) * 0.25F;
          f7 = MathHelper.cos(flowDir) * 0.25F;
          d8 = icon.getInterpolatedU(8.0F + (-f7 - f8) * 16.0F);
          d12 = icon.getInterpolatedV(8.0F + (-f7 + f8) * 16.0F);
          d7 = icon.getInterpolatedU(8.0F + (-f7 + f8) * 16.0F);
          d11 = icon.getInterpolatedV(8.0F + (f7 + f8) * 16.0F);
          d10 = icon.getInterpolatedU(8.0F + (f7 + f8) * 16.0F);
          d14 = icon.getInterpolatedV(8.0F + (f7 - f8) * 16.0F);
          d9 = icon.getInterpolatedU(8.0F + (f7 - f8) * 16.0F);
          d13 = icon.getInterpolatedV(8.0F + (-f7 - f8) * 16.0F);
        }

        tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
        f8 = 1.0F;
        tessellator.setColorOpaque_F(f4 * f8 * red, f4 * f8 * green, f4 * f8 * blue);

        if(!rises)
        {
          tessellator.addVertexWithUV(x + 0, y + d2, z + 0, d8, d12);
          tessellator.addVertexWithUV(x + 0, y + d3, z + 1, d7, d11);
          tessellator.addVertexWithUV(x + 1, y + d4, z + 1, d10, d14);
          tessellator.addVertexWithUV(x + 1, y + d5, z + 0, d9, d13);
        }
        else
        {
          tessellator.addVertexWithUV(x + 1, y + 1 - d5, z + 0, d9, d13);
          tessellator.addVertexWithUV(x + 1, y + 1 - d4, z + 1, d10, d14);
          tessellator.addVertexWithUV(x + 0, y + 1 - d3, z + 1, d7, d11);
          tessellator.addVertexWithUV(x + 0, y + 1 - d2, z + 0, d8, d12);
        }
      }

      if(renderer.renderAllFaces || renderBottom)
      {
        rendered = true;

        tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y - 1, z));
        float f10 = 1.0F;

        if(!rises)
        {
          tessellator.setColorOpaque_F(f3 * f10, f3 * f10, f3 * f10);
          renderer.renderFaceYNeg(block, x, y + d6, z, block.getIcon(0, bMeta));
        }
        else
        {
          tessellator.setColorOpaque_F(f4 * f10, f4 * f10, f4 * f10);
          renderer.renderFaceYPos(block, x, y + d6, z, block.getIcon(1, bMeta));
        }
      }

      for(int side = 0; side < 4; ++side)
      {
        int x2 = x;
        int z2 = z;

        switch(side)
        {
        case 0:
          --z2;
          break;
        case 1:
          ++z2;
          break;
        case 2:
          --x2;
          break;
        case 3:
          ++x2;
          break;
        }

        Icon icon1 = block.getIcon(side + 2, bMeta);

        if(renderer.renderAllFaces || renderSides[side])
        {
          rendered = true;

          double d15;
          double d16;
          double d17;
          double d18;
          double d19;
          double d20;

          if(side == 0)
          {
            d15 = d2;
            d17 = d5;
            d16 = x;
            d18 = x + 1;
            d19 = z + d6;
            d20 = z + d6;
          }
          else if(side == 1)
          {
            d15 = d4;
            d17 = d3;
            d16 = x + 1;
            d18 = x;
            d19 = z + 1 - d6;
            d20 = z + 1 - d6;
          }
          else if(side == 2)
          {
            d15 = d3;
            d17 = d2;
            d16 = x + d6;
            d18 = x + d6;
            d19 = z + 1;
            d20 = z;
          }
          else
          {
            d15 = d5;
            d17 = d4;
            d16 = x + 1 - d6;
            d18 = x + 1 - d6;
            d19 = z;
            d20 = z + 1;
          }
          float f11 = icon1.getInterpolatedU(0.0D);
          f8 = icon1.getInterpolatedU(8.0D);
          f7 = icon1.getInterpolatedV((1.0D - d15) * 16.0D * 0.5D);
          float f12 = icon1.getInterpolatedV((1.0D - d17) * 16.0D * 0.5D);
          float f13 = icon1.getInterpolatedV(8.0D);
          tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x2, y, z2));
          float f14 = 1.0F;

          if(side < 2)
          {
View Full Code Here

Examples of org.apache.isis.viewer.dnd.icon.Icon

        return requirement.isFor(ServiceObject.class) && requirement.getSpecification().isService();
    }

    @Override
    public View createView(final Content content, final Axes axes, final int sequence) {
        final Icon icon = new ServiceIcon(content, this);
        return new ServiceBorder(icon);
    }
View Full Code Here

Examples of org.apache.myfaces.trinidad.skin.Icon

      referencedIconStack = new Stack<String>();
    }

    referencedIconStack.push(refName);

    Icon icon = skin.getIcon(refName, false);

    if ((icon instanceof ReferenceIcon) && (icon != null))
    {

      return _resolveReferenceIcon(skin,
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.laf.base.Icon

  @Override
  protected Icon getIcon(
    IconKey iconKey
    )
  {
    Icon icon =   _icons[ iconKey.getKeyIndex()];

    return icon;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.