Skip to content
Commits on Source (6)
swtchart (0.10.0-1) unstable; urgency=medium
* Team upload.
* Add org.swtchart.ext to package
* Rename libraries to swtchart[-ext].jar
* Bump policy and debhelper versions
* Add missing build dependency on eclipse-rcp
* New upstream version 0.10.0
* Update copyright
-- Jochen Sprickerhof <jspricke@debian.org> Fri, 11 May 2018 19:04:17 +0200
swtchart (0.8.0-2) unstable; urgency=medium
* Team upload.
......
......@@ -3,14 +3,15 @@ Priority: optional
Section: java
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Uploaders: Jakub Adam <jakub.adam@ktknet.cz>
Build-Depends: debhelper (>= 9),
Build-Depends: debhelper (>= 11),
javahelper,
default-jdk,
ant,
libswt-gtk-4-java
Standards-Version: 3.9.8
Vcs-Git: https://anonscm.debian.org/git/pkg-java/swtchart.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/swtchart.git
libswt-gtk-4-java,
eclipse-rcp
Standards-Version: 4.1.4
Vcs-Git: https://salsa.debian.org/java-team/swtchart.git
Vcs-Browser: https://salsa.debian.org/java-team/swtchart
Homepage: http://www.swtchart.org
Package: libswtchart-java
......
......@@ -2,7 +2,7 @@ Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?revision=202
Upstream-Name: SWTChart
Files: *
Copyright: 2008-2011, SWTChart project
Copyright: 2008-2016, SWTChart project
License: EPL-1.0
Files: debian/*
......
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SWTChart Examples Plug-in
Bundle-SymbolicName: org.swtchart.examples.ext;singleton:=true
Bundle-Version: 0.8.0.qualifier
Bundle-Version: 0.10.0.qualifier
Bundle-Activator: org.swtchart.examples.Activator
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.ui,
......
......@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/org.swtchart_0.8.0.v20120301.jar"/>
<classpathentry kind="lib" path="lib/org.swtchart_0.10.0.v20160212.jar"/>
<classpathentry kind="lib" path="lib/swt.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SWTChart Extension Plug-in
Bundle-SymbolicName: org.swtchart.ext
Bundle-Version: 0.8.0.qualifier
Bundle-Version: 0.10.0.qualifier
Require-Bundle: org.eclipse.jface,
org.swtchart
Export-Package: org.swtchart.ext
......
......@@ -20,13 +20,12 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Spinner;
import org.eclipse.swt.widgets.Text;
import org.swtchart.IBarSeries;
import org.swtchart.IDisposeListener;
import org.swtchart.ILineSeries;
import org.swtchart.ILineSeries.PlotSymbolType;
import org.swtchart.ISeries;
import org.swtchart.LineStyle;
import org.swtchart.ILineSeries.PlotSymbolType;
import org.swtchart.ext.InteractiveChart;
/**
......@@ -408,7 +407,6 @@ public class SeriesPage extends AbstractSelectorPage {
*/
private void addBarSeriesGroup(Composite parent) {
barSeriesGroup = new Composite(parent, SWT.NONE);
new Text(parent, SWT.NONE);
barSeriesGroup.setLayout(new GridLayout(1, true));
barSeriesGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
......
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SWTChart Plug-in
Bundle-SymbolicName: org.swtchart;singleton:=true
Bundle-Version: 0.8.0.qualifier
Bundle-Version: 0.10.0.qualifier
Require-Bundle: org.eclipse.swt
Export-Package: org.swtchart
Bundle-RequiredExecutionEnvironment: J2SE-1.5
/*******************************************************************************
* Copyright (c) 2008-2011 SWTChart project. All rights reserved.
* Copyright (c) 2008-2016 SWTChart project. All rights reserved.
*
* This code is distributed under the terms of the Eclipse Public License v1.0
* which is available at http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.swtchart;
import java.util.EventListener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.ImageLoader;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.graphics.Transform;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.TypedListener;
import org.swtchart.internal.ChartLayout;
import org.swtchart.internal.ChartLayoutData;
import org.swtchart.internal.ChartTitle;
......@@ -69,7 +61,7 @@ public class Chart extends Composite implements Listener {
* the style of widget to construct
*/
public Chart(Composite parent, int style) {
super(parent, style);
super(parent, style | SWT.DOUBLE_BUFFERED);
orientation = SWT.HORIZONTAL;
compressEnabled = true;
......@@ -79,7 +71,7 @@ public class Chart extends Composite implements Listener {
setLayout(new ChartLayout());
title = new ChartTitle(this, SWT.NONE);
title = new ChartTitle(this);
title.setLayoutData(new ChartLayoutData(SWT.DEFAULT, 100));
legend = new Legend(this, SWT.NONE);
legend.setLayoutData(new ChartLayoutData(200, SWT.DEFAULT));
......@@ -184,6 +176,7 @@ public class Chart extends Composite implements Listener {
* @param orientation
* the orientation which can be SWT.HORIZONTAL or SWT.VERTICAL
*/
@Override
public void setOrientation(int orientation) {
if (orientation == SWT.HORIZONTAL || orientation == SWT.VERTICAL) {
this.orientation = orientation;
......@@ -198,6 +191,7 @@ public class Chart extends Composite implements Listener {
*
* @return the orientation which can be SWT.HORIZONTAL or SWT.VERTICAL
*/
@Override
public int getOrientation() {
return orientation;
}
......@@ -368,7 +362,9 @@ public class Chart extends Composite implements Listener {
public void save(String filename, int format) {
Image image = new Image(Display.getDefault(), getBounds());
renderOffscreenImage(image);
GC gc = new GC(image);
print(gc);
gc.dispose();
ImageData data = image.getImageData();
ImageLoader loader = new ImageLoader();
......@@ -385,59 +381,7 @@ public class Chart extends Composite implements Listener {
*/
public void renderOffscreenImage(Image image) {
GC gc = new GC(image);
gc.setFont(getFont());
gc.setBackground(getBackground());
gc.setForeground(getForeground());
gc.fillRectangle(getBounds());
paintControl(this, gc);
for (Control child : getChildren()) {
Rectangle r = child.getBounds();
Transform transform = new Transform(getDisplay());
transform.translate(r.x, r.y);
gc.setTransform(transform);
gc.setFont(child.getFont());
gc.setBackground(child.getBackground());
gc.setForeground(child.getForeground());
paintControl(child, gc);
transform.dispose();
}
print(gc);
gc.dispose();
}
/**
* Paints with the given graphics context with the paint listeners
* registered in given control.
*
* @param control
* The control
* @param gc
* The graphics context
*/
private static void paintControl(Control control, GC gc) {
for (Listener listener : control.getListeners(SWT.Paint)) {
if (listener instanceof TypedListener) {
EventListener eventListener = ((TypedListener) listener)
.getEventListener();
if (eventListener instanceof PaintListener) {
Event e = new Event();
e.type = SWT.Paint;
e.display = control.getDisplay();
e.widget = control;
e.gc = gc;
e.width = gc.getClipping().width;
e.height = gc.getClipping().height;
((PaintListener) eventListener)
.paintControl(new PaintEvent(e));
}
}
}
}
}
/*******************************************************************************
* Copyright (c) 2008-2011 SWTChart project. All rights reserved.
* Copyright (c) 2008-2016 SWTChart project. All rights reserved.
*
* This code is distributed under the terms of the Eclipse Public License v1.0
* which is available at http://www.eclipse.org/legal/epl-v10.html
......
/*******************************************************************************
* Copyright (c) 2008-2011 SWTChart project. All rights reserved.
* Copyright (c) 2008-2016 SWTChart project. All rights reserved.
*
* This code is distributed under the terms of the Eclipse Public License v1.0
* which is available at http://www.eclipse.org/legal/epl-v10.html
......
/*******************************************************************************
* Copyright (c) 2008-2011 SWTChart project. All rights reserved.
* Copyright (c) 2008-2016 SWTChart project. All rights reserved.
*
* This code is distributed under the terms of the Eclipse Public License v1.0
* which is available at http://www.eclipse.org/legal/epl-v10.html
......
/*******************************************************************************
* Copyright (c) 2008-2011 SWTChart project. All rights reserved.
* Copyright (c) 2008-2016 SWTChart project. All rights reserved.
*
* This code is distributed under the terms of the Eclipse Public License v1.0
* which is available at http://www.eclipse.org/legal/epl-v10.html
......
/*******************************************************************************
* Copyright (c) 2008-2011 SWTChart project. All rights reserved.
* Copyright (c) 2008-2016 SWTChart project. All rights reserved.
*
* This code is distributed under the terms of the Eclipse Public License v1.0
* which is available at http://www.eclipse.org/legal/epl-v10.html
......@@ -14,6 +14,52 @@ import org.eclipse.swt.graphics.Rectangle;
*/
public interface IBarSeries extends ISeries {
/**
* Bar width style.
*/
public enum BarWidthStyle {
/** the style stretching the bar width depending on interval of bars. */
STRETCHED,
/** the style fixing the bar width regardless of interval of bars. */
FIXED;
}
/**
* Gets the bar width style.
*
* @param style
* the bar width style
* @return the bar width style
*/
BarWidthStyle getBarWidthStyle(BarWidthStyle style);
/**
* Sets the bar width style. The default is <tt>BarWidthStyle.STRETCHED</tt>
* .
*
* @param style
* the bar width style
*/
void setBarWidthStyle(BarWidthStyle style);
/**
* Gets the bar width in pixels.
*
* @return the bar width in pixels
*/
int getBarWidth();
/**
* Sets the bar width in pixels. The specified bar width is active only when
* the bar width style is set to <tt>BarWidthStyle.FIXED</tt>.
*
* @param width
* the bar width in pixels
*/
void setBarWidth(int width);
/**
* Gets the bar padding in percentage.
*
......@@ -22,7 +68,8 @@ public interface IBarSeries extends ISeries {
int getBarPadding();
/**
* Sets the bar padding in percentage.
* Sets the bar padding in percentage. The specified padding is active only
* when the bar width style is set to <tt>BarWidthStyle.STRETCHED</tt>.
*
* @param padding
* the bar padding in percentage
......
/*******************************************************************************
* Copyright (c) 2008-2011 SWTChart project. All rights reserved.
* Copyright (c) 2008-2016 SWTChart project. All rights reserved.
*
* This code is distributed under the terms of the Eclipse Public License v1.0
* which is available at http://www.eclipse.org/legal/epl-v10.html
......
/*******************************************************************************
* Copyright (c) 2008-2011 SWTChart project. All rights reserved.
* Copyright (c) 2008-2016 SWTChart project. All rights reserved.
*
* This code is distributed under the terms of the Eclipse Public License v1.0
* which is available at http://www.eclipse.org/legal/epl-v10.html
......
/*******************************************************************************
* Copyright (c) 2008-2011 SWTChart project. All rights reserved.
* Copyright (c) 2008-2016 SWTChart project. All rights reserved.
*
* This code is distributed under the terms of the Eclipse Public License v1.0
* which is available at http://www.eclipse.org/legal/epl-v10.html
......@@ -108,7 +108,7 @@ public interface IErrorBar {
/**
* Gets the plus errors.
*
* @return the plus errors, or <tt>null</tt> if errors are not set.
* @return the plus errors, or empty array if errors are not set.
*/
double[] getPlusErrors();
......@@ -123,7 +123,7 @@ public interface IErrorBar {
/**
* Gets the minus errors.
*
* @return the minus errors, or <tt>null</tt> if errors are not set.
* @return the minus errors, or empty array if errors are not set.
*/
double[] getMinusErrors();
......
/*******************************************************************************
* Copyright (c) 2008-2011 SWTChart project. All rights reserved.
* Copyright (c) 2008-2016 SWTChart project. All rights reserved.
*
* This code is distributed under the terms of the Eclipse Public License v1.0
* which is available at http://www.eclipse.org/legal/epl-v10.html
......
/*******************************************************************************
* Copyright (c) 2008-2011 SWTChart project. All rights reserved.
* Copyright (c) 2008-2016 SWTChart project. All rights reserved.
*
* This code is distributed under the terms of the Eclipse Public License v1.0
* which is available at http://www.eclipse.org/legal/epl-v10.html
......