use of jmri.jmrit.catalog.NamedIcon in project JMRI by JMRI.
the class ItemPanel method makeNewIconMap.
protected static HashMap<String, NamedIcon> makeNewIconMap(String type) {
HashMap<String, NamedIcon> newMap = new HashMap<String, NamedIcon>();
String[] names = getNames(type);
for (int i = 0; i < names.length; i++) {
NamedIcon icon = new jmri.jmrit.catalog.NamedIcon(redX, redX);
newMap.put(names[i], icon);
}
return newMap;
}
use of jmri.jmrit.catalog.NamedIcon in project JMRI by JMRI.
the class SpeedometerFrame method setupIconMap.
private void setupIconMap(SensorIcon sensor) {
sensor.setIcon("SensorStateActive", new NamedIcon("resources/icons/smallschematics/tracksegments/circuit-occupied.gif", "resources/icons/smallschematics/tracksegments/circuit-occupied.gif"));
sensor.setIcon("SensorStateInactive", new NamedIcon("resources/icons/smallschematics/tracksegments/circuit-empty.gif", "resources/icons/smallschematics/tracksegments/circuit-empty.gif"));
sensor.setIcon("BeanStateInconsistent", new NamedIcon("resources/icons/smallschematics/tracksegments/circuit-error.gif", "resources/icons/smallschematics/tracksegments/circuit-error.gif"));
sensor.setIcon("BeanStateUnknown", new NamedIcon("resources/icons/smallschematics/tracksegments/circuit-error.gif", "resources/icons/smallschematics/tracksegments/circuit-error.gif"));
}
use of jmri.jmrit.catalog.NamedIcon in project JMRI by JMRI.
the class LargePowerManagerButton method loadIcons.
@Override
protected void loadIcons() {
setPowerOnIcon(new NamedIcon("resources/icons/throttles/power_green.png", "resources/icons/throttles/power_green.png"));
setPowerOffIcon(new NamedIcon("resources/icons/throttles/power_red.png", "resources/icons/throttles/power_red.png"));
setPowerUnknownIcon(new NamedIcon("resources/icons/throttles/power_yellow.png", "resources/icons/throttles/power_yellow.png"));
}
use of jmri.jmrit.catalog.NamedIcon in project JMRI by JMRI.
the class Editor method setUpBackground.
/*
* *********************** End Marker Menu Methods **********************
*/
/*
* ************ Adding content to the panel **********************
*/
public PositionableLabel setUpBackground(String name) {
NamedIcon icon = NamedIcon.getIconByName(name);
PositionableLabel l = new PositionableLabel(icon, this);
// no text
l.setPopupUtility(null);
l.setPositionable(false);
l.setShowTooltip(false);
l.setSize(icon.getIconWidth(), icon.getIconHeight());
l.setDisplayLevel(BKG);
l.setLocation(getNextBackgroundLeft(), 0);
putItem(l);
return l;
}
use of jmri.jmrit.catalog.NamedIcon in project JMRI by JMRI.
the class Editor method putBlockContents.
protected BlockContentsIcon putBlockContents() {
BlockContentsIcon l = new BlockContentsIcon(new NamedIcon("resources/icons/misc/X-red.gif", "resources/icons/misc/X-red.gif"), this);
IconAdder blockIconEditor = getIconEditor("BlockLabel");
l.setBlock(blockIconEditor.getTableSelection().getDisplayName());
l.setSize(l.getPreferredSize().width, l.getPreferredSize().height);
l.setDisplayLevel(MEMORIES);
setNextLocation(l);
putItem(l);
return l;
}
Aggregations