Package org.pentaho.reporting.designer.core.model.selection

Examples of org.pentaho.reporting.designer.core.model.selection.DocumentContextSelectionModel


  protected void updateSelection()
  {
    super.updateSelection();

    final DocumentContextSelectionModel model = getSelectionModel();
    if (model == null)
    {
      return;
    }
    final List<Element> visualElements = model.getSelectedElementsOfType(Element.class);

    boolean selected;
    if (visualElements.size() == 0)
    {
      selected = false;
View Full Code Here


  /**
   * Invoked when an action occurs.
   */
  public void actionPerformed(final ActionEvent e)
  {
    final DocumentContextSelectionModel model = getSelectionModel();
    if (model == null)
    {
      return;
    }
    final List<Element> visualElements = model.getSelectedElementsOfType(Element.class);

    Boolean value = null;
    final ArrayList<UndoEntry> undos = new ArrayList<UndoEntry>();
    for (Element element : visualElements)
    {
View Full Code Here

  /**
   * Invoked when an action occurs.
   */
  public void actionPerformed(final ActionEvent e)
  {
    final DocumentContextSelectionModel selectionModel = getSelectionModel();
    if (selectionModel == null)
    {
      return;
    }

    if (selectionModel.getSelectionCount() != 1)
    {
      return;
    }
    final Object selectedElement = selectionModel.getSelectedElement(0);
    if (selectedElement instanceof RelationalGroup == false)
    {
      setEnabled(false);
      return;
    }
View Full Code Here

    {
      return;
    }
    final Color color = (Color) o;

    final DocumentContextSelectionModel model = getSelectionModel();
    if (model == null)
    {
      return;
    }
    final List<Element> visualElements = model.getSelectedElementsOfType(Element.class);
    final ArrayList<UndoEntry> undos = new ArrayList<UndoEntry>();
    for (Element visualElement : visualElements)
    {
      final ElementStyleSheet styleSheet = visualElement.getStyle();
      undos.add(StyleEditUndoEntry.createConditional(visualElement, ElementStyleKeys.PAINT, color));
View Full Code Here

    putValue(Action.SELECTED_KEY, selected);
  }

  protected void updateSelection()
  {
    final DocumentContextSelectionModel model = getSelectionModel();
    if (model == null)
    {
      return;
    }
    final List<Band> visualElements = model.getSelectedElementsOfType(Band.class);
    if (visualElements.isEmpty())
    {
      setEnabled(false);
      return;
    }
View Full Code Here

  /**
   * Invoked when an action occurs.
   */
  public void actionPerformed(final ActionEvent e)
  {
    final DocumentContextSelectionModel model = getSelectionModel();
    if (model == null)
    {
      return;
    }
    final List<Band> visualElements = model.getSelectedElementsOfType(Band.class);

    final MassElementStyleUndoEntryBuilder builder = new MassElementStyleUndoEntryBuilder(visualElements);

    for (Band object : visualElements)
    {
View Full Code Here

  protected void updateSelection()
  {
    super.updateSelection();

    final DocumentContextSelectionModel model = getSelectionModel();
    if (model == null)
    {
      return;
    }
    final List<Element> visualElements = model.getSelectedElementsOfType(Element.class);
    if (visualElements.isEmpty())
    {
      setSelected(false);
      return;
    }
View Full Code Here

  /**
   * Invoked when an action occurs.
   */
  public void actionPerformed(final ActionEvent e)
  {
    final DocumentContextSelectionModel model = getSelectionModel();
    if (model == null)
    {
      return;
    }
    final List<Element> visualElements = model.getSelectedElementsOfType(Element.class);
    final ArrayList<UndoEntry> undos = new ArrayList<UndoEntry>();

    Boolean value = null;
    for (Element element : visualElements)
    {
View Full Code Here

    if (activeReportContext == null)
    {
      return;
    }

    final DocumentContextSelectionModel selectionModel1 = getSelectionModel();
    if (selectionModel1 == null)
    {
      return;
    }
    final Object leadSelection = selectionModel1.getLeadSelection();
    if (leadSelection instanceof Element == false)
    {
      return;
    }
View Full Code Here

    {
      setEnabled(false);
      return;
    }

    final DocumentContextSelectionModel selectionModel = getSelectionModel();
    if (selectionModel == null)
    {
      setEnabled(false);
      return;
    }

    if (selectionModel.getSelectionCount() == 0)
    {
      // there's nothing selected, we can safely add a new group
      // at the report level (AbstractReportDefinition)
      setEnabled(true);
      return;
    }
    if (isSingleElementSelection() == false)
    {
      // there's more than 1 element selected, disable because
      // we can't know where to insert in this case
      setEnabled(false);
      return;
    }

    final AbstractReportDefinition report = getActiveContext().getReportDefinition();
    final Object selectedElement = selectionModel.getSelectedElement(0);
    if (selectedElement == report || selectedElement instanceof RelationalGroup)
    {
      setEnabled(true);
      return;
    }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.designer.core.model.selection.DocumentContextSelectionModel

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.