public AreaCodeMapTest() { SortedMap<Integer, String> sortedMapForUS = new TreeMap<Integer, String>(); sortedMapForUS.put(1212, "New York"); sortedMapForUS.put(1480, "Arizona"); sortedMapForUS.put(1650, "California"); sortedMapForUS.put(1907, "Alaska"); sortedMapForUS.put(1201664, "Westwood, NJ"); sortedMapForUS.put(1480893, "Phoenix, AZ"); sortedMapForUS.put(1501372, "Little Rock, AR"); sortedMapForUS.put(1626308, "Alhambra, CA"); sortedMapForUS.put(1650345, "San Mateo, CA"); sortedMapForUS.put(1867993, "Dawson, YT"); sortedMapForUS.put(1972480, "Richardson, TX"); areaCodeMapForUS.readAreaCodeMap(sortedMapForUS); SortedMap<Integer, String> sortedMapForIT = new TreeMap<Integer, String>(); sortedMapForIT.put(3902, "Milan"); sortedMapForIT.put(3906, "Rome"); sortedMapForIT.put(39010, "Genoa"); sortedMapForIT.put(390131, "Alessandria"); sortedMapForIT.put(390321, "Novara"); sortedMapForIT.put(390975, "Potenza"); areaCodeMapForIT.readAreaCodeMap(sortedMapForIT); }
protected internal ResourceBundleSupport(Locale locale, ResourceBundle resourceBundle, string baseName) { base.\u002Ector(); ResourceBundleSupport resourceBundleSupport = this; if (locale == null) { string str = "Locale must not be null"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new NullPointerException(str); } else if (resourceBundle == null) { string str = "Resources must not be null"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new NullPointerException(str); } else if (baseName == null) { string str = "BaseName must not be null"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new NullPointerException(str); } else { this.locale = locale; this.resources = resourceBundle; this.resourceBase = baseName; this.cache = new TreeMap(); this.lookupPath = new TreeSet(); } }
public CategoryPlot(CategoryDataset dataset, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryItemRenderer renderer) { CategoryPlot categoryPlot = this; this.renderingOrder = DatasetRenderingOrder.__\u003C\u003EREVERSE; this.columnRenderingOrder = SortOrder.__\u003C\u003EASCENDING; this.rowRenderingOrder = SortOrder.__\u003C\u003EASCENDING; this.rangeCrosshairLockedOnData = true; this.orientation = PlotOrientation.__\u003C\u003EVERTICAL; this.domainAxes = new ObjectList(); this.domainAxisLocations = new ObjectList(); this.rangeAxes = new ObjectList(); this.rangeAxisLocations = new ObjectList(); this.datasetToDomainAxesMap = new TreeMap(); this.datasetToRangeAxesMap = new TreeMap(); this.renderers = new ObjectList(); this.datasets = new ObjectList(); this.datasets.set(0, (object) dataset); if (dataset != null) dataset.addChangeListener((DatasetChangeListener) this); this.axisOffset = RectangleInsets.__\u003C\u003EZERO_INSETS; this.setDomainAxisLocation(AxisLocation.__\u003C\u003EBOTTOM_OR_LEFT, false); this.setRangeAxisLocation(AxisLocation.__\u003C\u003ETOP_OR_LEFT, false); this.renderers.set(0, (object) renderer); if (renderer != null) { renderer.setPlot(this); renderer.addChangeListener((RendererChangeListener) this); } this.domainAxes.set(0, (object) domainAxis); this.mapDatasetToDomainAxis(0, 0); if (domainAxis != null) { domainAxis.setPlot((Plot) this); domainAxis.addChangeListener((AxisChangeListener) this); } this.drawSharedDomainAxis = false; this.rangeAxes.set(0, (object) rangeAxis); this.mapDatasetToRangeAxis(0, 0); if (rangeAxis != null) { rangeAxis.setPlot((Plot) this); rangeAxis.addChangeListener((AxisChangeListener) this); } this.configureDomainAxes(); this.configureRangeAxes(); this.domainGridlinesVisible = false; this.domainGridlinePosition = CategoryAnchor.__\u003C\u003EMIDDLE; this.domainGridlineStroke = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE; this.domainGridlinePaint = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT; this.rangeZeroBaselineVisible = false; this.rangeZeroBaselinePaint = (Paint) Color.black; this.rangeZeroBaselineStroke = (Stroke) new BasicStroke(0.5f); this.rangeGridlinesVisible = true; this.rangeGridlineStroke = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE; this.rangeGridlinePaint = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT; this.rangeMinorGridlinesVisible = false; this.rangeMinorGridlineStroke = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE; this.rangeMinorGridlinePaint = (Paint) Color.white; this.foregroundDomainMarkers = (Map) new HashMap(); this.backgroundDomainMarkers = (Map) new HashMap(); this.foregroundRangeMarkers = (Map) new HashMap(); this.backgroundRangeMarkers = (Map) new HashMap(); this.anchorValue = 0.0; this.domainCrosshairVisible = false; this.domainCrosshairStroke = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_STROKE; this.domainCrosshairPaint = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_PAINT; this.rangeCrosshairVisible = false; this.rangeCrosshairValue = 0.0; this.rangeCrosshairStroke = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_STROKE; this.rangeCrosshairPaint = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_PAINT; this.annotations = (List) new ArrayList(); this.rangePannable = false; }
private void load([In] NodeList obj0) { for (int index1 = 0; index1 < obj0.getLength(); ++index1) { if (String.instancehelper_equals(obj0.item(index1).getNodeName(), (object) "widget") || String.instancehelper_equals(obj0.item(index1).getNodeName(), (object) "static-widget")) { NamedNodeMap attributes1 = obj0.item(index1).getAttributes(); XMLWidget xmlWidget1 = new XMLWidget(); System.get_out().println(); for (int index2 = 0; index2 < attributes1.getLength(); ++index2) { if (String.instancehelper_equals(attributes1.item(index2).getNodeName(), (object) "field")) xmlWidget1.setField(attributes1.item(index2).getNodeValue()); else if (String.instancehelper_equals(attributes1.item(index2).getNodeName(), (object) "class")) xmlWidget1.setClass(attributes1.item(index2).getNodeValue()); else if (String.instancehelper_equals(attributes1.item(index2).getNodeName(), (object) "type")) xmlWidget1.setType(attributes1.item(index2).getNodeValue()); } TreeMap treeMap = new TreeMap(); NodeList childNodes1 = obj0.item(index1).getChildNodes(); for (int index2 = 0; index2 < childNodes1.getLength(); ++index2) { if (String.instancehelper_equals(String.instancehelper_trim(childNodes1.item(index2).getNodeName()), (object) "location")) { int num1 = 0; int num2 = 0; NamedNodeMap attributes2 = childNodes1.item(index2).getAttributes(); for (int index3 = 0; index3 < attributes2.getLength(); ++index3) { if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "x")) num1 = Integer.parseInt(attributes2.item(index3).getNodeValue()); else if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "y")) num2 = Integer.parseInt(attributes2.item(index3).getNodeValue()); } xmlWidget1.setLocation(new Point(num1, num2)); } else if (String.instancehelper_equals(String.instancehelper_trim(childNodes1.item(index2).getNodeName()), (object) "width")) xmlWidget1.setWidth(Integer.parseInt(childNodes1.item(index2).getChildNodes().item(0).getNodeValue())); else if (String.instancehelper_equals(String.instancehelper_trim(childNodes1.item(index2).getNodeName()), (object) "height")) xmlWidget1.setHeight(Integer.parseInt(childNodes1.item(index2).getChildNodes().item(0).getNodeValue())); else if (String.instancehelper_equals(String.instancehelper_trim(childNodes1.item(index2).getNodeName()), (object) "property")) { NamedNodeMap attributes2 = childNodes1.item(index2).getAttributes(); string name = (string) null; string str = (string) null; for (int index3 = 0; index3 < attributes2.getLength(); ++index3) { if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "name")) name = attributes2.item(index3).getNodeValue(); else if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "value")) str = attributes2.item(index3).getNodeValue(); } if (name != null && str != null) xmlWidget1.addProperty(name, str); } else if (String.instancehelper_equals(String.instancehelper_trim(childNodes1.item(index2).getNodeName()), (object) "widget")) { LWSubsystem.setLoaded(this.self); XMLWidget xmlWidget2 = new XMLWidget(); NamedNodeMap attributes2 = childNodes1.item(index2).getAttributes(); NodeList childNodes2 = childNodes1.item(index2).getChildNodes(); for (int index3 = 0; index3 < attributes2.getLength(); ++index3) { if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "field")) xmlWidget2.setField(attributes2.item(index3).getNodeValue()); else if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "class")) xmlWidget2.setClass(attributes2.item(index3).getNodeValue()); else if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "type")) xmlWidget2.setType(attributes2.item(index3).getNodeValue()); } System.get_out().println(new StringBuilder().append("\nLoading subwidget \"").append(xmlWidget2.getField()).append("\"").toString()); for (int index3 = 0; index3 < childNodes2.getLength(); ++index3) { string str = String.instancehelper_trim(childNodes2.item(index3).getNodeName()); if (String.instancehelper_equals(str, (object) "location")) { int num1 = 0; int num2 = 0; NamedNodeMap attributes3 = childNodes2.item(index3).getAttributes(); for (int index4 = 0; index4 < attributes3.getLength(); ++index4) { if (String.instancehelper_equals(String.instancehelper_trim(attributes3.item(index4).getNodeName()), (object) "x")) num1 = Integer.parseInt(attributes3.item(index4).getNodeValue()); else if (String.instancehelper_equals(String.instancehelper_trim(attributes3.item(index4).getNodeName()), (object) "y")) num2 = Integer.parseInt(attributes3.item(index4).getNodeValue()); } xmlWidget2.setLocation(new Point(num1, num2)); } else if (String.instancehelper_equals(str, (object) "height")) xmlWidget2.setHeight(Integer.parseInt(childNodes2.item(index3).getChildNodes().item(0).getNodeValue())); else if (String.instancehelper_equals(str, (object) "width")) xmlWidget2.setWidth(Integer.parseInt(childNodes2.item(index3).getChildNodes().item(0).getNodeValue())); } System.get_out().println(new StringBuilder().append("\tLocation: [").append((int) xmlWidget2.getLocation().x).append(",").append((int) xmlWidget2.getLocation().y).append("]").append("\n\tSize: (").append((int) xmlWidget2.getSize().width).append(",").append((int) xmlWidget2.getSize().height).append(")").toString()); ((Map) treeMap).put((object) Integer.valueOf((int) xmlWidget2.getLocation().y), (object) xmlWidget2); this.subsystems.put((object) xmlWidget1, (object) treeMap); } } string elementClass = xmlWidget1.getElementClass(); object obj = (object) "livewindow.elements"; CharSequence charSequence1; charSequence1.__\u003Cref\u003E = (__Null) obj; CharSequence charSequence2 = charSequence1; if (!String.instancehelper_contains(elementClass, charSequence2)) this.widgets.add((object) xmlWidget1); } else if (String.instancehelper_equals(obj0.item(index1).getNodeName(), (object) "hidden")) { NamedNodeMap attributes = obj0.item(index1).getAttributes(); for (int index2 = 0; index2 < attributes.getLength(); ++index2) { if (String.instancehelper_equals(attributes.item(index2).getNodeName(), (object) "field")) this.hiddenFields.add((object) attributes.item(index2).getNodeValue()); } } else if (String.instancehelper_equals(obj0.item(index1).getNodeName(), (object) "property")) { NamedNodeMap attributes = obj0.item(index1).getAttributes(); string str1 = (string) null; string str2 = (string) null; for (int index2 = 0; index2 < attributes.getLength(); ++index2) { if (String.instancehelper_equals(attributes.item(index2).getNodeName(), (object) "name")) str1 = attributes.item(index2).getNodeValue(); else if (String.instancehelper_equals(attributes.item(index2).getNodeName(), (object) "value")) str2 = attributes.item(index2).getNodeValue(); } if (str1 != null && str2 != null) this.properties.put((object) str1, (object) str2); } } }
private static SortedMap<Integer, String> createFlyweightStorageMapCandidate() { SortedMap<Integer, String> sortedMap = new TreeMap<Integer, String>(); sortedMap.put(1212, "New York"); sortedMap.put(1213, "New York"); sortedMap.put(1214, "New York"); sortedMap.put(1480, "Arizona"); return sortedMap; }
private static SortedMap<Integer, String> createDefaultStorageMapCandidate() { SortedMap<Integer, String> sortedMap = new TreeMap<Integer, String>(); // Make the area codes bigger to store them using integer. sortedMap.put(121212345, "New York"); sortedMap.put(148034434, "Arizona"); return sortedMap; }