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

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


  {
  }

  protected void updateSelection()
  {
    final DocumentContextSelectionModel selectionModel1 = getSelectionModel();
    if (selectionModel1 == null)
    {
      setEnabled(false);
      editedDataFactory = null;
      return;
    }

    final Object[] selectedObjects = selectionModel1.getSelectedElements();
    for (int i = 0; i < selectedObjects.length; i++)
    {
      final Object selectedObject = selectedObjects[i];
      if (selectedObject instanceof ReportQueryNode == false)
      {
View Full Code Here


  /**
   * Invoked when an action occurs.
   */
  public void actionPerformed(final ActionEvent e)
  {
    final DocumentContextSelectionModel selectionModel1 = getSelectionModel();
    if (selectionModel1 == null)
    {
      return;
    }
    final List<Element> visualElements = selectionModel1.getSelectedElementsOfType(Element.class);
    if (visualElements.isEmpty())
    {
      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);
    if (visualElements.size() <= 1)
    {
      return;
    }

View Full Code Here

    }
  }

  public void actionPerformed(final ActionEvent e)
  {
    final DocumentContextSelectionModel model = getSelectionModel();
    if (model == null)
    {
      return;
    }
    final List<Element> visualElements = model.getSelectedElementsOfType(Element.class);
    final EditableStyleSheet styleSheet = EditableStyleSheet.create(visualElements);

    final Component parent = getReportDesignerContext().getView().getParent();
    final Window window = LibSwingUtil.getWindowAncestor(parent);
    final HyperlinkEditorDialog dialog = createDialog(window);
View Full Code Here

  {
  }

  protected void updateSelection()
  {
    final DocumentContextSelectionModel model = getSelectionModel();
    if (model == null)
    {
      setEnabled(false);
      return;
    }

    final Object[] selectedObjects = model.getSelectedElements();
    for (int i = 0; i < selectedObjects.length; i++)
    {
      final Object selectedObject = selectedObjects[i];
      if (selectedObject instanceof ReportQueryNode == false)
      {
View Full Code Here

  {
  }

  public void actionPerformed(final ActionEvent e)
  {
    final DocumentContextSelectionModel model = getSelectionModel();
    if (model == null)
    {
      return;
    }
    final List<Element> visualElements = model.getSelectedElementsOfType(Element.class);
    final EditableStyleSheet styleSheet = EditableStyleSheet.create(visualElements);

    final Map<StyleKey,Expression> styleExpressions;
    if (visualElements.isEmpty())
    {
View Full Code Here

    if (o instanceof Integer == false)
    {
      return;
    }
    final Integer fontSize = (Integer) 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, TextStyleKeys.FONTSIZE, fontSize));
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>();
    for (Element element : visualElements)
    {
      final ElementStyleSheet styleSheet = element.getStyle();
      undos.add(StyleEditUndoEntry.createConditional(element, ElementStyleKeys.ALIGNMENT, ElementAlignment.RIGHT));
View Full Code Here

    {
      setEnabled(true);
      return;
    }

    final DocumentContextSelectionModel selectionModel = getSelectionModel();
    if (selectionModel == null)
    {
      setEnabled(false);
      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 Object selectedElement = selectionModel.getSelectedElement(0);
    if (selectedElement instanceof CrosstabGroup)
    {
      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.