int w = shadowSize; int h = shadowSize; images.put(Position.TOP_LEFT, getSubImage(targetImage, x, y, w, h)); x = 1; y = h; w = shadowSize; h = 1; images.put(Position.LEFT, getSubImage(targetImage, x, y, w, h)); x = 1; y = rectWidth; w = shadowSize; h = shadowSize; images.put(Position.BOTTOM_LEFT, getSubImage(targetImage, x, y, w, h)); x = cornerSize + 1; y = rectWidth; w = 1; h = shadowSize; images.put(Position.BOTTOM, getSubImage(targetImage, x, y, w, h)); x = rectWidth; y = x; w = shadowSize; h = shadowSize; images.put(Position.BOTTOM_RIGHT, getSubImage(targetImage, x, y, w, h)); x = rectWidth; y = cornerSize + 1; w = shadowSize; h = 1; images.put(Position.RIGHT, getSubImage(targetImage, x, y, w, h)); x = rectWidth;
/** * DOCUMENT ME! * * @param vpt * DOCUMENT ME! * * @return DOCUMENT ME! */ public JPanel getLegend(VisualPropertyType vpt) { JPanel p = new JPanel(); p.setLayout(new BorderLayout()); JLabel title = new JLabel(vpt.getName() + " is displayed as " + controllingAttrName); title.setFont(TITLE_FONT); title.setForeground(TITLE_COLOR); title.setHorizontalAlignment(SwingConstants.CENTER); title.setVerticalAlignment(SwingConstants.CENTER); title.setHorizontalTextPosition(SwingConstants.CENTER); title.setVerticalTextPosition(SwingConstants.CENTER); title.setPreferredSize(new Dimension(200, 50)); title.setBorder(new DropShadowBorder()); p.setBackground(Color.white); p.add(title, SwingConstants.CENTER); return p; } }
Map<Position,BufferedImage> images = getImages((Graphics2D)graphics);
Map<Position,BufferedImage> images = getImages((Graphics2D)graphics);
int w = shadowSize; int h = shadowSize; images.put(Position.TOP_LEFT, getSubImage(targetImage, x, y, w, h)); x = 1; y = h; w = shadowSize; h = 1; images.put(Position.LEFT, getSubImage(targetImage, x, y, w, h)); x = 1; y = rectWidth; w = shadowSize; h = shadowSize; images.put(Position.BOTTOM_LEFT, getSubImage(targetImage, x, y, w, h)); x = cornerSize + 1; y = rectWidth; w = 1; h = shadowSize; images.put(Position.BOTTOM, getSubImage(targetImage, x, y, w, h)); x = rectWidth; y = x; w = shadowSize; h = shadowSize; images.put(Position.BOTTOM_RIGHT, getSubImage(targetImage, x, y, w, h)); x = rectWidth; y = cornerSize + 1; w = shadowSize; h = 1; images.put(Position.RIGHT, getSubImage(targetImage, x, y, w, h)); x = rectWidth;
Map<Position,BufferedImage> images = getImages((Graphics2D)graphics);
public PassthroughLegend(PassthroughMapping<?, ?> mapping) { super(); setLayout(new BorderLayout()); setBackground(Color.white); final VisualProperty<?> vp = mapping.getVisualProperty(); final String columnName = mapping.getMappingColumnName(); final JLabel title = new JLabel(vp.getDisplayName() + " is displayed as " + columnName); title.setFont(TITLE_FONT); title.setForeground(TITLE_COLOR); title.setHorizontalAlignment(SwingConstants.CENTER); title.setVerticalAlignment(SwingConstants.CENTER); title.setHorizontalTextPosition(SwingConstants.CENTER); title.setVerticalTextPosition(SwingConstants.CENTER); title.setPreferredSize(new Dimension(200, 50)); title.setBorder(new DropShadowBorder()); add(title, SwingConstants.CENTER); } }
int w = shadowSize; int h = shadowSize; images.put(Position.TOP_LEFT, getSubImage(targetImage, x, y, w, h)); x = 1; y = h; w = shadowSize; h = 1; images.put(Position.LEFT, getSubImage(targetImage, x, y, w, h)); x = 1; y = rectWidth; w = shadowSize; h = shadowSize; images.put(Position.BOTTOM_LEFT, getSubImage(targetImage, x, y, w, h)); x = cornerSize + 1; y = rectWidth; w = 1; h = shadowSize; images.put(Position.BOTTOM, getSubImage(targetImage, x, y, w, h)); x = rectWidth; y = x; w = shadowSize; h = shadowSize; images.put(Position.BOTTOM_RIGHT, getSubImage(targetImage, x, y, w, h)); x = rectWidth; y = cornerSize + 1; w = shadowSize; h = 1; images.put(Position.RIGHT, getSubImage(targetImage, x, y, w, h)); x = rectWidth;
Map<Position,BufferedImage> images = getImages((Graphics2D)graphics);
header.setTitleFont(header.getTitleFont().deriveFont(header.getTitleFont().getSize()+4f)); header.setTitleForeground(new java.awt.Color(39, 119, 198)); header.setBorder(new org.jdesktop.swingx.border.DropShadowBorder()); add(header, java.awt.BorderLayout.PAGE_START);
int w = shadowSize; int h = shadowSize; images.put(Position.TOP_LEFT, getSubImage(targetImage, x, y, w, h)); x = 1; y = h; w = shadowSize; h = 1; images.put(Position.LEFT, getSubImage(targetImage, x, y, w, h)); x = 1; y = rectWidth; w = shadowSize; h = shadowSize; images.put(Position.BOTTOM_LEFT, getSubImage(targetImage, x, y, w, h)); x = cornerSize + 1; y = rectWidth; w = 1; h = shadowSize; images.put(Position.BOTTOM, getSubImage(targetImage, x, y, w, h)); x = rectWidth; y = x; w = shadowSize; h = shadowSize; images.put(Position.BOTTOM_RIGHT, getSubImage(targetImage, x, y, w, h)); x = rectWidth; y = cornerSize + 1; w = shadowSize; h = 1; images.put(Position.RIGHT, getSubImage(targetImage, x, y, w, h)); x = rectWidth;
Map<Position,BufferedImage> images = getImages((Graphics2D)graphics);
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { final VisualPropertyIcon icon; if (icons.size() > index) { icon = (VisualPropertyIcon) icons.get(index); } else icon = null; setText(value.toString()); setIcon(icon); setFont(isSelected ? SELECTED_FONT : NORMAL_FONT); this.setVerticalTextPosition(SwingConstants.CENTER); this.setVerticalAlignment(SwingConstants.CENTER); this.setIconTextGap(120); if (value instanceof VisualPropertyType && (((VisualPropertyType) value).getDataType() == String.class)) { final Object defVal = ((VisualPropertyType) value).getDefault(Cytoscape.getVisualMappingManager() .getVisualStyle()); if (defVal != null) { this.setToolTipText((String) defVal); } } setBackground(isSelected ? SELECTED_COLOR : list.getBackground()); setForeground(isSelected ? SELECTED_FONT_COLOR : list.getForeground()); if (icon != null) { setPreferredSize(new Dimension(icon.getIconWidth(), icon.getIconHeight() + 12)); } this.setBorder(new DropShadowBorder()); return this; } }
int w = shadowSize; int h = shadowSize; images.put(Position.TOP_LEFT, getSubImage(targetImage, x, y, w, h)); x = 1; y = h; w = shadowSize; h = 1; images.put(Position.LEFT, getSubImage(targetImage, x, y, w, h)); x = 1; y = rectWidth; w = shadowSize; h = shadowSize; images.put(Position.BOTTOM_LEFT, getSubImage(targetImage, x, y, w, h)); x = cornerSize + 1; y = rectWidth; w = 1; h = shadowSize; images.put(Position.BOTTOM, getSubImage(targetImage, x, y, w, h)); x = rectWidth; y = x; w = shadowSize; h = shadowSize; images.put(Position.BOTTOM_RIGHT, getSubImage(targetImage, x, y, w, h)); x = rectWidth; y = cornerSize + 1; w = shadowSize; h = 1; images.put(Position.RIGHT, getSubImage(targetImage, x, y, w, h)); x = rectWidth;