org.eclipse.birt.chart.ui_3.7.2.v20120213

16:41:29.823 INFO  jd.cli.Main - Decompiling org.eclipse.birt.chart.ui_3.7.2.v20120213.jar
package org.eclipse.birt.chart.ui.i18n;

import com.ibm.icu.util.ULocale;
import com.ibm.icu.util.UResourceBundle;
import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

public class Messages
{
  private static final String BUNDLE_NAME = "org.eclipse.birt.chart.ui.i18n.nls";
  private static final ResourceBundle RESOURCE_BUNDLE = UResourceBundle.getBundleInstance("org.eclipse.birt.chart.ui.i18n.nls", 
    ULocale.getDefault(), 
    Messages.class.getClassLoader());
  
  public static ResourceBundle getResourceBundle()
  {
    return RESOURCE_BUNDLE;
  }
  
  public static String getString(String key)
  {
    try
    {
      return RESOURCE_BUNDLE.getString(key);
    }
    catch (MissingResourceException localMissingResourceException) {}
    return '!' + key + '!';
  }
  
  public static String getString(String key, Object[] arguments)
  {
    return MessageFormat.format(getString(key), arguments);
  }
  
  public static String getString(String key, String argument)
  {
    return MessageFormat.format(getString(key), new Object[] {
      argument });
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.i18n.Messages
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.integrate;

import org.eclipse.birt.chart.model.Chart;
import org.eclipse.birt.chart.ui.swt.interfaces.IChartType;
import org.eclipse.birt.chart.ui.swt.interfaces.IChartUIHelper;
import org.eclipse.birt.chart.ui.swt.wizard.ChartWizardContext;

public class ChartUIHelperBase
  implements IChartUIHelper
{
  public boolean isDefaultTitleSupported()
  {
    return false;
  }
  
  public String getDefaultTitle(ChartWizardContext context)
  {
    return "";
  }
  
  public void updateDefaultTitle(Chart cm, Object extendedItem) {}
  
  public boolean canCombine(IChartType type, ChartWizardContext context)
  {
    return type.canCombine();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.integrate.ChartUIHelperBase
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.integrate;

import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

class SimpleHyperlinkBuilder$1
  implements Listener
{
  SimpleHyperlinkBuilder$1(SimpleHyperlinkBuilder paramSimpleHyperlinkBuilder) {}
  
  public void handleEvent(Event event)
  {
    SimpleHyperlinkBuilder.access$0(this$0);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.integrate.SimpleHyperlinkBuilder.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.integrate;

import org.eclipse.birt.chart.integrate.SimpleActionHandle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;

class SimpleHyperlinkBuilder$2
  implements Listener
{
  SimpleHyperlinkBuilder$2(SimpleHyperlinkBuilder paramSimpleHyperlinkBuilder) {}
  
  public void handleEvent(Event event)
  {
    SimpleHyperlinkBuilder.access$0(this$0);
    SimpleHyperlinkBuilder.access$1(this$0).setLayout(new GridLayout(2, false));
    
    new Label(SimpleHyperlinkBuilder.access$1(this$0), 0).setText("*" + 
      SimpleHyperlinkBuilder.access$2());
    SimpleHyperlinkBuilder.access$3(this$0, new Text(SimpleHyperlinkBuilder.access$1(this$0), 2052));
    SimpleHyperlinkBuilder.access$4(this$0).setLayoutData(new GridData(768));
    SimpleHyperlinkBuilder.access$4(this$0).setText(SimpleHyperlinkBuilder.access$5(this$0).getURI());
    
    SimpleHyperlinkBuilder.access$6(this$0);
    
    SimpleHyperlinkBuilder.access$1(this$0).layout();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.integrate.SimpleHyperlinkBuilder.2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.integrate;

import java.io.IOException;
import org.eclipse.birt.chart.integrate.SimpleActionHandle;
import org.eclipse.birt.chart.integrate.SimpleActionUtil;
import org.eclipse.birt.chart.ui.i18n.Messages;
import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

public class SimpleHyperlinkBuilder
  extends TrayDialog
{
  private Button noneRadio;
  private Button uriRadio;
  private static final String RADIO_NONE = Messages.getString("SimpleHyperlinkBuilder.Label.RadioNone");
  private static final String RADIO_URI = Messages.getString("SimpleHyperlinkBuilder.Label.RadioURI");
  private static final String TITLE = Messages.getString("SimpleHyperlinkBuilder.Title");
  private static final String LABEL_SELECT_TYPE = Messages.getString("SimpleHyperlinkBuilder.Label.SelectType");
  private static final String LABEL_LOCATION = Messages.getString("SimpleHyperlinkBuilder.Label.Location");
  private static final String LABEL_TARGET = Messages.getString("SimpleHyperlinkBuilder.Label.Target");
  private static final String REQUIED_MARK = "*";
  private Composite displayArea;
  private Text locationEditor;
  private Combo targetChooser;
  private SimpleActionHandle inputHandle;
  
  protected SimpleHyperlinkBuilder(Shell shell)
  {
    super(shell);
  }
  
  public String getResultString()
    throws IOException
  {
    return SimpleActionUtil.serializeAction(inputHandle);
  }
  
  public void setInputString(String input)
  {
    setInput(SimpleActionUtil.deserializeAction(input));
  }
  
  public String getTitle()
  {
    return getShell().getText();
  }
  
  public void setTitle(String title)
  {
    getShell().setText(title);
  }
  
  protected Control createDialogArea(Composite parent)
  {
    Composite composite = (Composite)super.createDialogArea(parent);
    setTitle(TITLE);
    createSelectionArea(composite);
    new Label(composite, 258).setLayoutData(new GridData(768));
    displayArea = new Composite(composite, 0);
    
    displayArea.setLayoutData(new GridData(400, 300));
    
    new Label(composite, 258).setLayoutData(new GridData(768));
    if (inputHandle.getTargetWindow().length() > 0)
    {
      uriRadio.setSelection(true);
      uriRadio.notifyListeners(13, new Event());
    }
    return composite;
  }
  
  private void createSelectionArea(Composite parent)
  {
    Composite composite = new Composite(parent, 0);
    composite.setLayoutData(new GridData(768));
    composite.setLayout(new GridLayout(2, false));
    
    new Label(composite, 0).setText(LABEL_SELECT_TYPE);
    
    noneRadio = new Button(composite, 16);
    noneRadio.setText(RADIO_NONE);
    noneRadio.addListener(13, new Listener()
    {
      public void handleEvent(Event event)
      {
        SimpleHyperlinkBuilder.this.clearArea();
      }
    });
    new Label(composite, 0);
    
    uriRadio = new Button(composite, 16);
    uriRadio.setText(RADIO_URI);
    uriRadio.addListener(13, new Listener()
    {
      public void handleEvent(Event event)
      {
        SimpleHyperlinkBuilder.this.clearArea();
        displayArea.setLayout(new GridLayout(2, false));
        
        new Label(displayArea, 0).setText("*" + 
          SimpleHyperlinkBuilder.LABEL_LOCATION);
        locationEditor = new Text(displayArea, 2052);
        locationEditor.setLayoutData(new GridData(768));
        locationEditor.setText(inputHandle.getURI());
        
        SimpleHyperlinkBuilder.this.createTargetBar();
        
        displayArea.layout();
      }
    });
  }
  
  private void createTargetBar()
  {
    new Label(displayArea, 0).setText(LABEL_TARGET);
    targetChooser = new Combo(displayArea, 2056);
    targetChooser.setLayoutData(new GridData(768));
    targetChooser.setItems(new String[] {
      "_blank", "_parent", "_self", "_top" });
    if (inputHandle.getTargetWindow().length() > 0) {
      targetChooser.setText(inputHandle.getTargetWindow());
    } else {
      targetChooser.select(0);
    }
  }
  
  private void clearArea()
  {
    Control[] controls = displayArea.getChildren();
    for (int i = 0; i < controls.length; i++) {
      controls[i].dispose();
    }
  }
  
  public void setInput(SimpleActionHandle input)
  {
    inputHandle = input;
  }
  
  protected void okPressed()
  {
    if (noneRadio.getSelection())
    {
      inputHandle = null;
    }
    else
    {
      inputHandle.setURI(locationEditor.getText().trim());
      inputHandle.setTargetWindow(targetChooser.getText());
    }
    super.okPressed();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.integrate.SimpleHyperlinkBuilder
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.integrate;

import org.eclipse.birt.chart.ui.swt.interfaces.ISeriesButtonEntry;
import org.eclipse.birt.chart.ui.swt.interfaces.ITaskPopupSheet;

public class SimpleSeriesButtonEntry
  implements ISeriesButtonEntry
{
  private final String buttonId;
  private final String popupName;
  private final ITaskPopupSheet popupSheet;
  private final boolean bEnabled;
  
  public SimpleSeriesButtonEntry(String buttonId, String popupName, ITaskPopupSheet popupSheet, boolean bEnabled)
  {
    this.buttonId = buttonId;
    this.popupName = popupName;
    this.popupSheet = popupSheet;
    this.bEnabled = bEnabled;
  }
  
  public String getButtonId()
  {
    return buttonId;
  }
  
  public String getPopupName()
  {
    return popupName;
  }
  
  public ITaskPopupSheet getPopupSheet()
  {
    return popupSheet;
  }
  
  public boolean isEnabled()
  {
    return bEnabled;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.integrate.SimpleSeriesButtonEntry
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.integrate;

import org.eclipse.birt.chart.ui.swt.interfaces.IAssistField;
import org.eclipse.birt.chart.ui.swt.interfaces.IExpressionButton;
import org.eclipse.birt.chart.ui.util.ChartUIUtil;
import org.eclipse.birt.chart.ui.util.ChartUIUtil.EAttributeAccessor;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Listener;

class SimpleUIServiceProviderImpl$1
  implements IExpressionButton
{
  SimpleUIServiceProviderImpl$1(SimpleUIServiceProviderImpl paramSimpleUIServiceProviderImpl, Control paramControl) {}
  
  public void setExpression(String expr)
  {
    if (expr != null) {
      ChartUIUtil.setText(val$control, expr);
    }
  }
  
  public void setEnabled(boolean bEnabled)
  {
    val$control.setEnabled(bEnabled);
  }
  
  public boolean isEnabled()
  {
    return val$control.isEnabled();
  }
  
  public String getExpression()
  {
    return ChartUIUtil.getText(val$control);
  }
  
  public String getDisplayExpression()
  {
    return getExpression();
  }
  
  public void addListener(Listener listener) {}
  
  public void setAccessor(ChartUIUtil.EAttributeAccessor<String> accessor) {}
  
  public String getExpressionType()
  {
    return null;
  }
  
  public boolean isCube()
  {
    return false;
  }
  
  public void setBindingName(String bindingName, boolean bNotifyEvents) {}
  
  public void setExpression(String expr, boolean bNotifyEvents) {}
  
  public void setAssitField(IAssistField assistField) {}
  
  public void setPredefinedQuery(Object[] predefinedQuery) {}
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.integrate.SimpleUIServiceProviderImpl.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.integrate;

import java.util.List;
import java.util.Vector;
import org.eclipse.birt.chart.exception.ChartException;
import org.eclipse.birt.chart.log.ILogger;
import org.eclipse.birt.chart.log.Logger;
import org.eclipse.birt.chart.model.Chart;
import org.eclipse.birt.chart.ui.i18n.Messages;
import org.eclipse.birt.chart.ui.swt.interfaces.IAssistField;
import org.eclipse.birt.chart.ui.swt.interfaces.IExpressionButton;
import org.eclipse.birt.chart.ui.swt.interfaces.IFormatSpecifierHandler;
import org.eclipse.birt.chart.ui.swt.interfaces.IUIServiceProvider;
import org.eclipse.birt.chart.ui.swt.interfaces.IUIServiceProvider.Command;
import org.eclipse.birt.chart.ui.util.ChartUIUtil;
import org.eclipse.birt.chart.ui.util.ChartUIUtil.EAttributeAccessor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;

public class SimpleUIServiceProviderImpl
  implements IUIServiceProvider
{
  private static ILogger logger = Logger.getLogger("org.eclipse.birt.chart.ui/integrate");
  private IFormatSpecifierHandler formatSpecifierHandler;
  
  public String invoke(String sExpression, Object oContext, String sTitle)
  {
    logger.log(2, 
      Messages.getString("SimpleUIServiceProviderImpl.Warn.Placeholder"));
    return sExpression;
  }
  
  public String invoke(String sExpression, Object oContext, String sTitle, boolean isChartProvider)
  {
    logger.log(2, 
      Messages.getString("SimpleUIServiceProviderImpl.Warn.Placeholder"));
    return sExpression;
  }
  
  public String[] validate(Chart chartModel, Object oContext)
  {
    return null;
  }
  
  public List getRegisteredKeys()
  {
    List list = new Vector();
    list.add("SampleKey");
    return list;
  }
  
  public String getValue(String sKey)
  {
    if (sKey.equals("SampleKey")) {
      return "Sample Value";
    }
    return null;
  }
  
  public double getConvertedValue(double dOriginalValue, String sFromUnits, String sToUnits)
  {
    return dOriginalValue;
  }
  
  public String invoke(int command, String value, Object context, String sTitle)
    throws ChartException
  {
    switch (command)
    {
    case 6: 
    case 7: 
      Shell shell = new Shell(Display.getDefault(), 67696);
      
      ChartUIUtil.bindHelp(shell, 
        "org.eclipse.birt.chart.cshelp.EditURL_ID");
      SimpleHyperlinkBuilder hb = new SimpleHyperlinkBuilder(shell);
      try
      {
        hb.setInputString(value);
        if (sTitle != null) {
          hb.setTitle(hb.getTitle() + " - " + sTitle);
        }
        if (hb.open() == 0) {
          value = hb.getResultString();
        }
      }
      catch (Exception e)
      {
        throw new ChartException("org.eclipse.birt.chart.ui", 
          13, 
          e);
      }
    }
    return value;
  }
  
  public boolean isInvokingSupported()
  {
    return true;
  }
  
  public boolean isEclipseModeSupported()
  {
    return false;
  }
  
  public Object invoke(IUIServiceProvider.Command command, Object... inData)
    throws ChartException
  {
    Object outData = null;
    switch (command)
    {
    case EXPRESS_BUTTON_CREATE: 
      final Control control = (Control)inData[1];
      new Label((Composite)inData[0], 0);
      IExpressionButton ceb = new IExpressionButton()
      {
        public void setExpression(String expr)
        {
          if (expr != null) {
            ChartUIUtil.setText(control, expr);
          }
        }
        
        public void setEnabled(boolean bEnabled)
        {
          control.setEnabled(bEnabled);
        }
        
        public boolean isEnabled()
        {
          return control.isEnabled();
        }
        
        public String getExpression()
        {
          return ChartUIUtil.getText(control);
        }
        
        public String getDisplayExpression()
        {
          return getExpression();
        }
        
        public void addListener(Listener listener) {}
        
        public void setAccessor(ChartUIUtil.EAttributeAccessor<String> accessor) {}
        
        public String getExpressionType()
        {
          return null;
        }
        
        public boolean isCube()
        {
          return false;
        }
        
        public void setBindingName(String bindingName, boolean bNotifyEvents) {}
        
        public void setExpression(String expr, boolean bNotifyEvents) {}
        
        public void setAssitField(IAssistField assistField) {}
        
        public void setPredefinedQuery(Object[] predefinedQuery) {}
      };
      outData = ceb;
    }
    return outData;
  }
  
  public IFormatSpecifierHandler getFormatSpecifierHandler()
  {
    return formatSpecifierHandler;
  }
  
  public void setFormatSpecifierHandler(IFormatSpecifierHandler handler)
  {
    formatSpecifierHandler = handler;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.integrate.SimpleUIServiceProviderImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.plugin;

import org.eclipse.ui.plugin.AbstractUIPlugin;

public class ChartUIPlugin
  extends AbstractUIPlugin
{
  public static final String ID = "org.eclipse.birt.chart.ui";
  private static ChartUIPlugin plugin;
  
  public ChartUIPlugin()
  {
    plugin = this;
  }
  
  public static ChartUIPlugin getDefault()
  {
    return plugin;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.plugin.ChartUIPlugin
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.swt;

import org.eclipse.birt.chart.model.attribute.Insets;
import org.eclipse.swt.widgets.Composite;

public abstract class AbstractChartInsets
  extends Composite
{
  public AbstractChartInsets(Composite parent, int style)
  {
    super(parent, style);
  }
  
  public abstract void setInsets(Insets paramInsets, String paramString);
  
  public abstract void setDefaultInsets(Insets paramInsets);
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.swt.AbstractChartInsets
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.swt;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Listener;

public abstract class AbstractChartIntSpinner
  extends Composite
{
  public AbstractChartIntSpinner(Composite parent, int style)
  {
    super(parent, style);
  }
  
  public abstract void setValue(int paramInt);
  
  public abstract int getValue();
  
  public abstract void setIncrement(int paramInt);
  
  public abstract void setMaximum(int paramInt);
  
  public abstract void setMinimum(int paramInt);
  
  public abstract void addListener(Listener paramListener);
  
  public abstract boolean isSpinnerEnabled();
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.swt.AbstractChartIntSpinner
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.swt;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;

public abstract class AbstractChartNumberEditor
  extends Composite
{
  public AbstractChartNumberEditor(Composite parent, int style)
  {
    super(parent, style);
  }
  
  public abstract boolean isSetValue();
  
  public abstract void unsetValue();
  
  public abstract void setValue(double paramDouble);
  
  public abstract double getValue();
  
  public abstract Text getTextControl();
  
  public abstract Label getUnitLabel();
  
  public abstract void addFractionListener(Listener paramListener);
  
  public abstract void addModifyListener(ModifyListener paramModifyListener);
  
  public abstract void setEObjectParent(EObject paramEObject);
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.swt.AbstractChartNumberEditor
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.swt;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;

public abstract class AbstractChartTextEditor
  extends Composite
{
  public AbstractChartTextEditor(Composite parent, int style)
  {
    super(parent, style);
  }
  
  public abstract void setText(String paramString);
  
  public abstract String getText();
  
  public abstract void addListener(Listener paramListener);
  
  public abstract void setDefaultValue(String paramString);
  
  public abstract Text getTextControl();
  
  public abstract void setEObjectParent(EObject paramEObject);
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.swt.AbstractChartTextEditor
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.swt;

import org.eclipse.birt.core.ui.swt.custom.CustomChooserComposite;
import org.eclipse.swt.widgets.Composite;

public abstract class AbstractHeadStyleChooserComposite
  extends CustomChooserComposite
{
  public AbstractHeadStyleChooserComposite(Composite parent, int style, Object choiceValue)
  {
    super(parent, style, choiceValue);
  }
  
  public abstract int getHeadStyle();
  
  public abstract void setHeadStyle(int paramInt);
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.swt.AbstractHeadStyleChooserComposite
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.swt;

import org.eclipse.birt.core.ui.swt.custom.CustomChooserComposite;
import org.eclipse.swt.widgets.Composite;

public abstract class AbstractLineStyleChooserComposite
  extends CustomChooserComposite
{
  public AbstractLineStyleChooserComposite(Composite parent, int style, Object choiceValue)
  {
    super(parent, style, choiceValue);
  }
  
  public abstract int getLineStyle();
  
  public abstract void setLineStyle(int paramInt);
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.swt.AbstractLineStyleChooserComposite
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.swt;

import org.eclipse.birt.core.ui.swt.custom.CustomChooserComposite;
import org.eclipse.swt.widgets.Composite;

public abstract class AbstractLineWidthChooserComposite
  extends CustomChooserComposite
{
  public AbstractLineWidthChooserComposite(Composite parent, int style, Object choiceValue)
  {
    super(parent, style, choiceValue);
  }
  
  public abstract int getLineWidth();
  
  public abstract void setLineWidth(int paramInt);
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.swt.AbstractLineWidthChooserComposite
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.swt;

import com.ibm.icu.util.ULocale;
import java.util.Locale;
import org.eclipse.birt.chart.factory.IMessageLookup;
import org.eclipse.birt.chart.ui.swt.interfaces.IUIServiceProvider;

public class ChartBuilderMessageLookup
  implements IMessageLookup
{
  private IUIServiceProvider serviceProvider;
  
  public ChartBuilderMessageLookup(IUIServiceProvider serviceProvider)
  {
    this.serviceProvider = serviceProvider;
  }
  
  public String getMessageValue(String sKey, Locale lcl)
  {
    if (serviceProvider == null) {
      return sKey;
    }
    return serviceProvider.getValue(sKey);
  }
  
  public String getMessageValue(String sKey, ULocale lcl)
  {
    if (serviceProvider == null) {
      return sKey;
    }
    return serviceProvider.getValue(sKey);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.swt.ChartBuilderMessageLookup
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.swt;

import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

public class ChartCheckbox
  extends Composite
  implements Listener, SelectionListener
{
  public static final int STATE_GRAYED = 0;
  public static final int STATE_SELECTED = 1;
  public static final int STATE_UNSELECTED = 2;
  protected Button button;
  protected List<SelectionListener> selectListenerList = new ArrayList(2);
  protected boolean bDefaultSelection = false;
  
  public ChartCheckbox(Composite container, int styles)
  {
    this(container, styles, false);
  }
  
  public ChartCheckbox(Composite container, int styles, boolean defaultSelection)
  {
    super(container, 0);
    bDefaultSelection = defaultSelection;
    placeComponents(styles);
    initListeners();
  }
  
  protected void initListeners() {}
  
  protected void placeComponents(int styles)
  {
    GridLayout gl = new GridLayout();
    marginHeight = 0;
    marginWidth = 0;
    marginLeft = 0;
    marginRight = 0;
    marginTop = 0;
    marginBottom = 0;
    setLayout(gl);
    button = new Button(this, 0x20 | styles);
    GridData gd = new GridData(1808);
    button.setLayoutData(gd);
  }
  
  public void setDefaultSelection(boolean defSelection)
  {
    bDefaultSelection = defSelection;
  }
  
  public void setText(String text)
  {
    button.setText(text);
  }
  
  public int getSelectionState()
  {
    if (button.getGrayed()) {
      return bDefaultSelection ? 1 : 
        2;
    }
    if (button.getSelection()) {
      return 1;
    }
    return 2;
  }
  
  public void setSelectionState(int state)
  {
    switch (state)
    {
    case 0: 
      button.setSelection(bDefaultSelection);
      break;
    case 1: 
      button.setSelection(true);
      break;
    case 2: 
      button.setSelection(false);
    }
  }
  
  public void addListener(int eventType, Listener listener)
  {
    super.addListener(eventType, listener);
    if (button != null) {
      button.addListener(eventType, this);
    }
  }
  
  public void addSelectionListener(SelectionListener listener)
  {
    selectListenerList.add(listener);
    button.addSelectionListener(this);
  }
  
  public Button getButton()
  {
    return button;
  }
  
  public void handleEvent(Event event)
  {
    if (widget == button)
    {
      widget = this;
      Listener[] lis = getListeners(type);
      for (int i = lis.length - 1; i >= 0; i--) {
        lis[i].handleEvent(event);
      }
    }
  }
  
  public void widgetDefaultSelected(SelectionEvent event) {}
  
  public void widgetSelected(SelectionEvent event)
  {
    if (widget == button)
    {
      Event e = new Event();
      detail = detail;
      data = data;
      display = display;
      doit = doit;
      height = height;
      item = item;
      stateMask = stateMask;
      text = text;
      time = time;
      width = width;
      widget = this;
      x = x;
      y = y;
      SelectionEvent se = new SelectionEvent(e);
      for (int i = selectListenerList.size() - 1; i >= 0; i--) {
        ((SelectionListener)selectListenerList.get(i)).widgetSelected(se);
      }
    }
  }
  
  public void setEnabled(boolean enabled)
  {
    super.setEnabled(enabled);
    button.setEnabled(enabled);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.swt.ChartCheckbox
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.swt;

import java.util.Vector;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;

public class ChartCombo
  extends Composite
  implements SelectionListener
{
  protected Combo cmbItems;
  protected Vector<SelectionListener> vListeners = new Vector();
  protected String[] data;
  private String defaultItem;
  private int defaultIndex;
  protected EObject eParent = null;
  protected String sProperty = null;
  
  public ChartCombo(Composite parent, int style, EObject eParent, String sProperty, String defaultItem)
  {
    super(parent, 0);
    this.eParent = eParent;
    this.sProperty = sProperty;
    placeComponents(style);
    this.defaultItem = defaultItem;
  }
  
  protected void placeComponents(int style)
  {
    GridLayout gl = new GridLayout(1, false);
    marginBottom = 0;
    marginHeight = 0;
    marginLeft = 0;
    marginRight = 0;
    marginTop = 0;
    marginWidth = 0;
    setLayout(gl);
    
    cmbItems = new Combo(this, style);
    GridData gd = new GridData(1808);
    cmbItems.setLayoutData(gd);
  }
  
  public void add(String item)
  {
    cmbItems.add(item);
  }
  
  public void add(String item, int index)
  {
    cmbItems.add(item, index);
  }
  
  public void setItems(String[] items)
  {
    cmbItems.setItems(items);
  }
  
  public String[] getItems()
  {
    return cmbItems.getItems();
  }
  
  public int getSelectionIndex()
  {
    return cmbItems.getSelectionIndex();
  }
  
  public void removeAll()
  {
    cmbItems.removeAll();
  }
  
  public void setItemData(String[] data)
  {
    this.data = data;
    defaultIndex = indexOf(defaultItem);
  }
  
  public void setDefualtItem(String itemName)
  {
    defaultItem = itemName;
    defaultIndex = indexOf(defaultItem);
  }
  
  public void select(int index)
  {
    cmbItems.select(index);
  }
  
  public void setText(String text)
  {
    if (text == null)
    {
      cmbItems.select(defaultIndex);
      return;
    }
    cmbItems.setText(text);
  }
  
  public void setSelection(String itemName)
  {
    if (data != null) {
      for (int i = 0; i < data.length; i++) {
        if (itemName.equals(data[i]))
        {
          cmbItems.select(i);
          return;
        }
      }
    }
  }
  
  protected int indexOf(String itemName)
  {
    if ((data != null) && (itemName != null)) {
      for (int i = 0; i < data.length; i++) {
        if (itemName.equals(data[i])) {
          return i;
        }
      }
    }
    return -1;
  }
  
  public String getSelectedItemData()
  {
    return data[cmbItems.getSelectionIndex()];
  }
  
  public void setEnabled(boolean enabled)
  {
    super.setEnabled(enabled);
    cmbItems.setEnabled(enabled);
  }
  
  public Combo getWidget()
  {
    return cmbItems;
  }
  
  public void addSelectionListener(SelectionListener listener)
  {
    vListeners.add(listener);
    cmbItems.addSelectionListener(this);
  }
  
  public void widgetDefaultSelected(SelectionEvent arg0) {}
  
  public void widgetSelected(SelectionEvent event)
  {
    if (widget == cmbItems)
    {
      Event e = new Event();
      detail = detail;
      data = data;
      display = display;
      doit = doit;
      height = height;
      item = item;
      stateMask = stateMask;
      text = text;
      time = time;
      width = width;
      widget = this;
      x = x;
      y = y;
      SelectionEvent se = new SelectionEvent(e);
      for (int i = vListeners.size() - 1; i >= 0; i--) {
        ((SelectionListener)vListeners.get(i)).widgetSelected(se);
      }
    }
  }
  
  public void setEObjectParent(EObject eParent)
  {
    this.eParent = eParent;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.swt.ChartCombo
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.swt;

import org.eclipse.swt.widgets.Canvas;

class ChartPreviewPainter$1
  implements Runnable
{
  ChartPreviewPainter$1(ChartPreviewPainter paramChartPreviewPainter) {}
  
  public void run()
  {
    ChartPreviewPainter.access$0(this$0);
    if (!this$0.isDisposedPreviewCanvas()) {
      this$0.preview.redraw();
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.ui.swt.ChartPreviewPainter.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.ui.swt;

import org.eclipse.birt.chart.device.IUpdateNotifier;
import org.eclipse.birt.chart.factory.GeneratedChartState;
import org.eclipse.birt.chart.model.Chart;
import org.eclipse.birt.chart.ui.swt.interfaces.IDataServiceProvider;
import org.eclipse.birt.chart.ui.swt.wizard.ChartWizardContext;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Display;

public class ChartPreviewPainter
  extends ChartPreviewPainterBase
  implements PaintListener, IUpdateNotifier
{
  private boolean bIsPainting = false;
  private Image buffer;
  private GeneratedChartState gcs = null;
  private static int X_OFFSET = 3;
  private static int Y_OFFSET = 3;
  
  public ChartPreviewPainter(ChartWizardContext wizardContext)
  {
    super(wizardContext);
  }
  
  protected void paintChart()
  {
    if (!isDisposedPreviewCanvas()) {
      Display.getDefault().asyncExec(new Runnable()
      {
        public void run()
        {
          ChartPreviewPainter.this.updateBuffer();
          if (!isDisposedPreviewCanvas()) {
            preview.redraw();
          }
        }
      });
    }
  }
  
  /* Error */
  private void updateBuffer()
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 297	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:bIsPainting	Z
    //   4: ifeq +4 -> 8
    //   7: return
    //   8: aload_0
    //   9: getfield 299	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:chart	Lorg/eclipse/birt/chart/model/IChartObject;
    //   12: ifnonnull +4 -> 16
    //   15: return
    //   16: aload_0
    //   17: invokevirtual 327	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:isDisposedPreviewCanvas	()Z
    //   20: ifeq +4 -> 24
    //   23: return
    //   24: aload_0
    //   25: getfield 302	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:preview	Lorg/eclipse/swt/widgets/Canvas;
    //   28: invokevirtual 359	org/eclipse/swt/widgets/Canvas:getClientArea	()Lorg/eclipse/swt/graphics/Rectangle;
    //   31: astore_1
    //   32: new 161	org/eclipse/swt/graphics/Rectangle
    //   35: dup
    //   36: iconst_0
    //   37: iconst_0
    //   38: aload_1
    //   39: getfield 305	org/eclipse/swt/graphics/Rectangle:width	I
    //   42: aload_1
    //   43: getfield 304	org/eclipse/swt/graphics/Rectangle:height	I
    //   46: invokespecial 356	org/eclipse/swt/graphics/Rectangle:<init>	(IIII)V
    //   49: astore_2
    //   50: aload_2
    //   51: getfield 305	org/eclipse/swt/graphics/Rectangle:width	I
    //   54: iconst_2
    //   55: getstatic 295	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:X_OFFSET	I
    //   58: imul
    //   59: isub
    //   60: ifle +16 -> 76
    //   63: aload_2
    //   64: getfield 304	org/eclipse/swt/graphics/Rectangle:height	I
    //   67: iconst_2
    //   68: getstatic 296	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:Y_OFFSET	I
    //   71: imul
    //   72: isub
    //   73: ifgt +33 -> 106
    //   76: aload_0
    //   77: getfield 301	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:buffer	Lorg/eclipse/swt/graphics/Image;
    //   80: ifnull +25 -> 105
    //   83: aload_0
    //   84: getfield 301	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:buffer	Lorg/eclipse/swt/graphics/Image;
    //   87: invokevirtual 353	org/eclipse/swt/graphics/Image:isDisposed	()Z
    //   90: ifne +15 -> 105
    //   93: aload_0
    //   94: getfield 301	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:buffer	Lorg/eclipse/swt/graphics/Image;
    //   97: invokevirtual 352	org/eclipse/swt/graphics/Image:dispose	()V
    //   100: aload_0
    //   101: aconst_null
    //   102: putfield 301	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:buffer	Lorg/eclipse/swt/graphics/Image;
    //   105: return
    //   106: aload_0
    //   107: iconst_1
    //   108: putfield 297	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:bIsPainting	Z
    //   111: aconst_null
    //   112: astore_3
    //   113: aload_0
    //   114: getfield 301	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:buffer	Lorg/eclipse/swt/graphics/Image;
    //   117: ifnonnull +21 -> 138
    //   120: aload_0
    //   121: new 160	org/eclipse/swt/graphics/Image
    //   124: dup
    //   125: invokestatic 364	org/eclipse/swt/widgets/Display:getDefault	()Lorg/eclipse/swt/widgets/Display;
    //   128: aload_2
    //   129: invokespecial 355	org/eclipse/swt/graphics/Image:<init>	(Lorg/eclipse/swt/graphics/Device;Lorg/eclipse/swt/graphics/Rectangle;)V
    //   132: putfield 301	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:buffer	Lorg/eclipse/swt/graphics/Image;
    //   135: goto +41 -> 176
    //   138: aload_0
    //   139: getfield 301	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:buffer	Lorg/eclipse/swt/graphics/Image;
    //   142: invokevirtual 354	org/eclipse/swt/graphics/Image:getBounds	()Lorg/eclipse/swt/graphics/Rectangle;
    //   145: astore 4
    //   147: aload_0
    //   148: getfield 301	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:buffer	Lorg/eclipse/swt/graphics/Image;
    //   151: astore_3
    //   152: aload_2
    //   153: aload 4
    //   155: invokevirtual 357	org/eclipse/swt/graphics/Rectangle:equals	(Ljava/lang/Object;)Z
    //   158: ifne +18 -> 176
    //   161: aload_0
    //   162: new 160	org/eclipse/swt/graphics/Image
    //   165: dup
    //   166: invokestatic 364	org/eclipse/swt/widgets/Display:getDefault	()Lorg/eclipse/swt/widgets/Display;
    //   169: aload_2
    //   170: invokespecial 355	org/eclipse/swt/graphics/Image:<init>	(Lorg/eclipse/swt/graphics/Device;Lorg/eclipse/swt/graphics/Rectangle;)V
    //   173: putfield 301	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:buffer	Lorg/eclipse/swt/graphics/Image;
    //   176: new 159	org/eclipse/swt/graphics/GC
    //   179: dup
    //   180: aload_0
    //   181: getfield 301	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:buffer	Lorg/eclipse/swt/graphics/Image;
    //   184: invokespecial 349	org/eclipse/swt/graphics/GC:<init>	(Lorg/eclipse/swt/graphics/Drawable;)V
    //   187: astore 4
    //   189: aload 4
    //   191: invokestatic 364	org/eclipse/swt/widgets/Display:getDefault	()Lorg/eclipse/swt/widgets/Display;
    //   194: bipush 25
    //   196: invokevirtual 362	org/eclipse/swt/widgets/Display:getSystemColor	(I)Lorg/eclipse/swt/graphics/Color;
    //   199: invokevirtual 348	org/eclipse/swt/graphics/GC:setBackground	(Lorg/eclipse/swt/graphics/Color;)V
    //   202: aload 4
    //   204: aload_0
    //   205: getfield 301	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:buffer	Lorg/eclipse/swt/graphics/Image;
    //   208: invokevirtual 354	org/eclipse/swt/graphics/Image:getBounds	()Lorg/eclipse/swt/graphics/Rectangle;
    //   211: invokevirtual 351	org/eclipse/swt/graphics/GC:fillRectangle	(Lorg/eclipse/swt/graphics/Rectangle;)V
    //   214: getstatic 295	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:X_OFFSET	I
    //   217: i2d
    //   218: getstatic 296	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:Y_OFFSET	I
    //   221: i2d
    //   222: aload_2
    //   223: getfield 305	org/eclipse/swt/graphics/Rectangle:width	I
    //   226: iconst_2
    //   227: getstatic 295	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:X_OFFSET	I
    //   230: imul
    //   231: isub
    //   232: i2d
    //   233: aload_2
    //   234: getfield 304	org/eclipse/swt/graphics/Rectangle:height	I
    //   237: iconst_2
    //   238: getstatic 296	org/eclipse/birt/chart/ui/swt/ChartPreviewPainter:Y_OFFSET	I
    //   241: imul
    //   242: isub
    //   243: i2d
    //   244: invokestatic 321	org/eclipse/birt/chart/model
1 2 3 4 5 6 7 8

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd