Package org.swtchart

Examples of org.swtchart.IDisposeListener


            Font font = new Font(Display.getDefault(), fontData);
            axes[i].getTitle().setFont(font);
            final String fontKey = AXIS_TITLE_FONT + axes[i].getDirection()
                    + axes[i].getId();
            if (resources.getFont(fontKey) == null) {
                axes[i].addDisposeListener(new IDisposeListener() {
                    public void disposed(Event e) {
                        resources.removeFont(fontKey);
                    }
                });
            }
            resources.put(fontKey, font);

            Color color = new Color(Display.getDefault(), titleColors[i]);
            axes[i].getTitle().setForeground(color);
            final String colorKey = AXIS_TITLE_FOREGROUND
                    + axes[i].getDirection() + axes[i].getId();
            if (resources.getColor(colorKey) == null) {
                axes[i].addDisposeListener(new IDisposeListener() {
                    public void disposed(Event e) {
                        resources.removeColor(colorKey);
                    }
                });
            }
View Full Code Here


            Color color = new Color(Display.getDefault(), colors[i]);
            series[i].getLabel().setForeground(color);
            final String colorKey = SERIES_LABEL_FOREGROUND + series[i].getId();
            if (resources.getColor(colorKey) == null) {
                series[i].addDisposeListener(new IDisposeListener() {
                    public void disposed(Event e) {
                        resources.removeColor(colorKey);
                    }
                });
            }
            resources.put(colorKey, color);

            FontData fontData = series[i].getLabel().getFont().getFontData()[0];
            fontData.setHeight(fontSizes[i]);
            Font font = new Font(Display.getDefault(), fontData);
            series[i].getLabel().setFont(font);
            final String fontKey = SERIES_LABEL_FONT + series[i].getId();
            if (resources.getFont(fontKey) == null) {
                series[i].addDisposeListener(new IDisposeListener() {
                    public void disposed(Event e) {
                        resources.removeFont(fontKey);
                    }
                });
            }
View Full Code Here

                Color lineColor = new Color(Display.getDefault(), lineColors[i]);
                ((ILineSeries) series[i]).setLineColor(lineColor);
                final String lineColorKey = SERIES_LINE_COLOR
                        + series[i].getId();
                if (resources.getColor(lineColorKey) == null) {
                    series[i].addDisposeListener(new IDisposeListener() {
                        public void disposed(Event e) {
                            resources.removeColor(lineColorKey);
                        }
                    });
                }
                resources.put(lineColorKey, lineColor);

                Color symbolColor = new Color(Display.getDefault(),
                        symbolColors[i]);
                ((ILineSeries) series[i]).setSymbolColor(symbolColor);
                final String symbolColorKey = SERIES_SYMBOL_COLOR
                        + series[i].getId();
                if (resources.getColor(symbolColorKey) == null) {
                    series[i].addDisposeListener(new IDisposeListener() {
                        public void disposed(Event e) {
                            resources.removeColor(symbolColorKey);
                        }
                    });
                }
                resources.put(symbolColorKey, symbolColor);

                ((ILineSeries) series[i]).setLineStyle(lineStyles[i]);
                ((ILineSeries) series[i]).setSymbolType(symbolTypes[i]);
                ((ILineSeries) series[i]).setSymbolSize(symbolSizes[i]);
            } else if (series[i] instanceof IBarSeries) {
                Color barColor = new Color(Display.getDefault(), barColors[i]);
                ((IBarSeries) series[i]).setBarColor(barColor);
                final String barColorKey = SERIES_BAR_COLOR + series[i].getId();
                if (resources.getColor(barColorKey) == null) {
                    series[i].addDisposeListener(new IDisposeListener() {
                        public void disposed(Event e) {
                            resources.removeColor(barColorKey);
                        }
                    });
                }
View Full Code Here

            Font font = new Font(Display.getDefault(), fontData);
            axes[i].getTick().setFont(font);
            final String fontKey = AXIS_TICK_FONT + axes[i].getDirection()
                    + axes[i].getId();
            if (resources.getFont(fontKey) == null) {
                axes[i].addDisposeListener(new IDisposeListener() {
                    public void disposed(Event e) {
                        resources.removeFont(fontKey);
                    }
                });
            }
            resources.put(fontKey, font);

            Color color = new Color(Display.getDefault(), foregroundColors[i]);
            axes[i].getTick().setForeground(color);
            final String colorKey = AXIS_TICK_FOREGROUND
                    + axes[i].getDirection() + axes[i].getId();
            if (resources.getColor(colorKey) == null) {
                axes[i].addDisposeListener(new IDisposeListener() {
                    public void disposed(Event e) {
                        resources.removeColor(colorKey);
                    }
                });
            }
View Full Code Here

TOP

Related Classes of org.swtchart.IDisposeListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.