public void refresh() { Iterable<Property> properties = Collections.emptyList(); if (beanHelper != null) { Image icon = beanHelper.getIcon(BeanInfo.ICON_COLOR_32x32); if (icon == null) { remove(top); } else { JXImageView logo = new JXImageView(); logo.setImage(icon); add(logo, BorderLayout.NORTH); } properties = filter( beanHelper.getProperties(), new Predicate<Property>() { @Override public boolean apply(Property input) { return !input.isHidden(); } }); } table.setModel(new MyTableModel(properties)); // should we expose minimum row/column sizes as a user property? table.setRowHeight(18); // essentially the minimum row height table.getColumnModel().getColumn(0).setMinWidth(1); table.getColumnModel().getColumn(0).setMaxWidth(1); table.getColumnModel().getColumn(1).setMinWidth(1); table.packAll(); revalidate(); }
public void quack() { duckImageView.setImage( new ImageIcon( getClass() .getResource( "/net/greybeardedgeek/intellij/plugin/rubberDuckToolWindow/duck.png")) .getImage()); }