org.jdesktop.swingx.painter.Painter Java Examples
The following examples show how to use
org.jdesktop.swingx.painter.Painter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractSpotModule.java From orbit-image-analysis with GNU General Public License v3.0 | 5 votes |
public SpotCellRenderer() { dummyThn = new ImageIcon(new BufferedImage(thumbnailWidth, thumbnailHeight, BufferedImage.TYPE_INT_RGB)); dummyThn.getImage().getGraphics().setColor(Color.white); dummyThn.getImage().getGraphics().fillRect(0, 0, dummyThn.getIconWidth(), dummyThn.getIconHeight()); jxlab.setBackgroundPainter((Painter<JXLabelExt>) (g2d, label, width, height) -> { if (label.isProposed) g2d.setPaint(new GradientPaint(0, 0, label.getBackground(), label.getWidth(), label.getHeight(), Color.white)); else g2d.setPaint(label.getBackground()); g2d.fillRect(0, 0, label.getWidth(), label.getHeight()); }); }
Example #2
Source File: RelativePainterHighlighter.java From BART with MIT License | 5 votes |
/** * Overridden to wrap a RelativePainter around the given, if not already is * of type RelativePainter. */ // <snip> Relative Decorator // Wraps Painter into RelativePainter (hack around missing api in swingx) @Override public void setPainter(Painter painter) { if (!(painter instanceof RelativePainter)) { painter = new RelativePainter(painter); } super.setPainter(painter); }
Example #3
Source File: RelativePainterHighlighter.java From BART with MIT License | 5 votes |
public void setPainter(Painter<? super T> painter) { uninstallPainterListener(); Object old = getPainter(); this.painter = painter; installPainterListener(); firePropertyChange("painter", old, getPainter()); }
Example #4
Source File: RelativePainterHighlighter.java From BART with MIT License | 4 votes |
public RelativePainterHighlighter(Painter delegate) { super(delegate); }
Example #5
Source File: RelativePainterHighlighter.java From BART with MIT License | 4 votes |
public RelativePainter(Painter<? super T> delegate) { this.painter = delegate; installPainterListener(); }
Example #6
Source File: RelativePainterHighlighter.java From BART with MIT License | 4 votes |
public RelativePainter(Painter<? super T> delegate, double xPercent) { this(delegate); xFactor = xPercent; }
Example #7
Source File: RelativePainterHighlighter.java From BART with MIT License | 4 votes |
public Painter<? super T> getPainter() { return painter; }