Package jmri.jmrit.roster
Class RosterIconFactory
- java.lang.Object
-
- jmri.jmrit.roster.RosterIconFactory
-
- All Implemented Interfaces:
InstanceManagerAutoDefault
public class RosterIconFactory extends java.lang.Object implements InstanceManagerAutoDefault
Generate and cache icons at a given height. A managed instance will generate icons for a default height, while unmanaged instances can be created to generate icons at different heights.
This file is part of JMRI.JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.HashMap<java.lang.String,javax.swing.ImageIcon>
icons
-
Constructor Summary
Constructors Constructor Description RosterIconFactory()
RosterIconFactory(int h)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.ImageIcon
getIcon(java.lang.String id)
javax.swing.ImageIcon
getIcon(RosterEntry re)
javax.swing.ImageIcon
getReversedIcon(java.lang.String id)
javax.swing.ImageIcon
getReversedIcon(RosterEntry re)
-
-
-
Field Detail
-
icons
java.util.HashMap<java.lang.String,javax.swing.ImageIcon> icons
-
-
Constructor Detail
-
RosterIconFactory
public RosterIconFactory(int h)
-
RosterIconFactory
public RosterIconFactory()
-
-
Method Detail
-
getIcon
public javax.swing.ImageIcon getIcon(java.lang.String id)
-
getReversedIcon
public javax.swing.ImageIcon getReversedIcon(java.lang.String id)
-
getIcon
public javax.swing.ImageIcon getIcon(RosterEntry re)
-
getReversedIcon
public javax.swing.ImageIcon getReversedIcon(RosterEntry re)
-
-