Skip to content

Commit

Permalink
JFXEX-00365: ChartFX: Added ScatterChart to Renderer #407
Browse files Browse the repository at this point in the history
  • Loading branch information
ndp1410 committed Jun 21, 2019
1 parent 82b7320 commit 273c4e5
Show file tree
Hide file tree
Showing 53 changed files with 2,327 additions and 36 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,16 @@ _UI_AreaChart3dFX_type = Area Chart3d FX
_UI_BarChart3dFX_type = Bar Chart3d FX
_UI_LineChart3dFX_type = Line Chart3d FX
_UI_PieChart3dFX_type = Pie Chart3d FX
_UI_XYZChartFX_type = XYZ Chart FX
_UI_XYZSeries_type = XYZ Series
_UI_ScatterChart3dFX_type = Scatter Chart3d FX
_UI_XYZChartFX_series_feature = Series
_UI_XYZSeries_name_feature = Name
_UI_XYZSeries_values_feature = Values
_UI_XYZValueFX_type = XYZ Value FX
_UI_XYZValueFX_x_feature = X
_UI_XYZValueFX_y_feature = Y
_UI_XYZValueFX_z_feature = Z
_UI_XYZSeriesFX_type = XYZ Series FX
_UI_XYZSeriesFX_name_feature = Name
_UI_XYZSeriesFX_values_feature = Values
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,29 @@ public Adapter createChartProjectAdapter() {
return chartProjectItemProvider;
}

/**
* This keeps track of the one adapter used for all {@link de.dc.javafx.xcore.workbench.chart.XYZSeriesFX} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected XYZSeriesFXItemProvider xyzSeriesFXItemProvider;

/**
* This creates an adapter for a {@link de.dc.javafx.xcore.workbench.chart.XYZSeriesFX}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createXYZSeriesFXAdapter() {
if (xyzSeriesFXItemProvider == null) {
xyzSeriesFXItemProvider = new XYZSeriesFXItemProvider(this);
}

return xyzSeriesFXItemProvider;
}

/**
* This keeps track of the one adapter used for all {@link de.dc.javafx.xcore.workbench.chart.CategorySeriesFX} instances.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -166,6 +189,29 @@ public Adapter createXYValueFXAdapter() {
return xyValueFXItemProvider;
}

/**
* This keeps track of the one adapter used for all {@link de.dc.javafx.xcore.workbench.chart.XYZValueFX} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected XYZValueFXItemProvider xyzValueFXItemProvider;

/**
* This creates an adapter for a {@link de.dc.javafx.xcore.workbench.chart.XYZValueFX}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createXYZValueFXAdapter() {
if (xyzValueFXItemProvider == null) {
xyzValueFXItemProvider = new XYZValueFXItemProvider(this);
}

return xyzValueFXItemProvider;
}

/**
* This keeps track of the one adapter used for all {@link de.dc.javafx.xcore.workbench.chart.CategoryValueFX} instances.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -396,6 +442,29 @@ public Adapter createPieChart3dFXAdapter() {
return pieChart3dFXItemProvider;
}

/**
* This keeps track of the one adapter used for all {@link de.dc.javafx.xcore.workbench.chart.ScatterChart3dFX} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ScatterChart3dFXItemProvider scatterChart3dFXItemProvider;

/**
* This creates an adapter for a {@link de.dc.javafx.xcore.workbench.chart.ScatterChart3dFX}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createScatterChart3dFXAdapter() {
if (scatterChart3dFXItemProvider == null) {
scatterChart3dFXItemProvider = new ScatterChart3dFXItemProvider(this);
}

return scatterChart3dFXItemProvider;
}

/**
* This keeps track of the one adapter used for all {@link de.dc.javafx.xcore.workbench.chart.BarChartFX} instances.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -549,12 +618,16 @@ public void fireNotifyChanged(Notification notification) {
public void dispose() {
if (chartProjectItemProvider != null)
chartProjectItemProvider.dispose();
if (xyzSeriesFXItemProvider != null)
xyzSeriesFXItemProvider.dispose();
if (categorySeriesFXItemProvider != null)
categorySeriesFXItemProvider.dispose();
if (seriesFXItemProvider != null)
seriesFXItemProvider.dispose();
if (xyValueFXItemProvider != null)
xyValueFXItemProvider.dispose();
if (xyzValueFXItemProvider != null)
xyzValueFXItemProvider.dispose();
if (categoryValueFXItemProvider != null)
categoryValueFXItemProvider.dispose();
if (lineChartFXItemProvider != null)
Expand All @@ -577,6 +650,8 @@ public void dispose() {
lineChart3dFXItemProvider.dispose();
if (pieChart3dFXItemProvider != null)
pieChart3dFXItemProvider.dispose();
if (scatterChart3dFXItemProvider != null)
scatterChart3dFXItemProvider.dispose();
if (chartFXConfigItemProvider != null)
chartFXConfigItemProvider.dispose();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors

newChildDescriptors.add(createChildParameter(ChartPackage.Literals.CHART_PROJECT__CHARTS,
ChartFactory.eINSTANCE.createPieChart3dFX()));

newChildDescriptors.add(createChildParameter(ChartPackage.Literals.CHART_PROJECT__CHARTS,
ChartFactory.eINSTANCE.createScatterChart3dFX()));
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
/**
*/
package de.dc.javafx.xcore.workbench.chart.provider;

import de.dc.javafx.xcore.workbench.chart.ScatterChart3dFX;

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;

/**
* This is the item provider adapter for a {@link de.dc.javafx.xcore.workbench.chart.ScatterChart3dFX} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class ScatterChart3dFXItemProvider extends XYZChartFXItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ScatterChart3dFXItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}

/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);

}
return itemPropertyDescriptors;
}

/**
* This returns ScatterChart3dFX.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/ScatterChart3dFX"));
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected boolean shouldComposeCreationImage() {
return true;
}

/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((ScatterChart3dFX) object).getName();
return label == null || label.length() == 0 ? getString("_UI_ScatterChart3dFX_type")
: getString("_UI_ScatterChart3dFX_type") + " " + label;
}

/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
}

/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors

newChildDescriptors.add(createChildParameter(ChartPackage.Literals.SERIES_FX__VALUES,
ChartFactory.eINSTANCE.createXYValueFX()));

newChildDescriptors.add(createChildParameter(ChartPackage.Literals.SERIES_FX__VALUES,
ChartFactory.eINSTANCE.createXYZValueFX()));
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
/**
*/
package de.dc.javafx.xcore.workbench.chart.provider;

import de.dc.javafx.xcore.workbench.chart.ChartFactory;
import de.dc.javafx.xcore.workbench.chart.ChartPackage;
import de.dc.javafx.xcore.workbench.chart.XYZChartFX;

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EStructuralFeature;

import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;

/**
* This is the item provider adapter for a {@link de.dc.javafx.xcore.workbench.chart.XYZChartFX} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class XYZChartFXItemProvider extends ChartFXItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public XYZChartFXItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}

/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);

}
return itemPropertyDescriptors;
}

/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(ChartPackage.Literals.XYZ_CHART_FX__SERIES);
}
return childrenFeatures;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.

return super.getChildFeature(object, child);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected boolean shouldComposeCreationImage() {
return true;
}

/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((XYZChartFX) object).getName();
return label == null || label.length() == 0 ? getString("_UI_XYZChartFX_type")
: getString("_UI_XYZChartFX_type") + " " + label;
}

/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);

switch (notification.getFeatureID(XYZChartFX.class)) {
case ChartPackage.XYZ_CHART_FX__SERIES:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
super.notifyChanged(notification);
}

/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);

newChildDescriptors.add(createChildParameter(ChartPackage.Literals.XYZ_CHART_FX__SERIES,
ChartFactory.eINSTANCE.createXYZSeriesFX()));
}

}
Loading

0 comments on commit 273c4e5

Please sign in to comment.