Tabnine Logo
ConcreteTextSelector
Code IndexAdd Tabnine to your IDE (free)

How to use
ConcreteTextSelector
in
org.apache.batik.bridge

Best Java code snippets using org.apache.batik.bridge.ConcreteTextSelector (Showing top 20 results out of 315)

origin: org.apache.xmlgraphics/batik-swing

/**
 * Clears the selection.
 */
public void clearSelection() {
  textSelector.clearSelection();
}
origin: apache/batik

/**
 * Add a selection listener to be notified when the
 * text selection changes in the document.
 */
public void addSelectionListener(SelectionListener sl) {
  textSelector.addSelectionListener(sl);
}
origin: org.apache.xmlgraphics/batik-bridge

public void mouseEntered(GraphicsNodeMouseEvent evt) {
  checkSelectGesture(evt);
}
origin: org.apache.xmlgraphics/batik-bridge

if (isDeselectGesture(evt)) {
  if (selectionNode != null) {
    selectionNodeRoot.removeTreeGraphicsNodeChangeListener(this);
  clearSelection();
} else if (mevt != null) {
    (isSelectStartGesture(evt))) {
    if (selectionNode != source) {
      if (selectionNode != null) {
    dispatchSelectionEvent(
        new SelectionEvent(null,
            SelectionEvent.SELECTION_STARTED,
            null));
  } else if (isSelectEndGesture(evt)) {
    if (selectionNode == source)  {
      ((Selectable) source).selectTo(p.getX(), p.getY());
    Object oldSelection = getSelection();
    if (selectionNode != null) {
      Shape newShape;
      newShape = ((Selectable)selectionNode).getHighlightShape();
      dispatchSelectionEvent
        (new SelectionEvent(oldSelection,
                  SelectionEvent.SELECTION_DONE,
                  newShape));
origin: org.apache.xmlgraphics/batik-bridge

public void changeCompleted (GraphicsNodeChangeEvent gnce) {
  if (selectionNode == null) {
    return;
  }
  Shape newShape =
    ((Selectable)selectionNode).getHighlightShape();
  dispatchSelectionEvent
    (new SelectionEvent(getSelection(),
              SelectionEvent.SELECTION_CHANGED,
              newShape));
}
origin: org.apache.xmlgraphics/batik-swing

public void mousePressed(GraphicsNodeMouseEvent evt) {
  if (evt.getSource() instanceof Selectable) {
    textSelector.mousePressed(evt);
  } else if (selectionHighlight != null) {
    textSelector.clearSelection();
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Creates a new TextSelectionManager.
 */
public TextSelectionManager(JGVTComponent comp,
              EventDispatcher ed) {
  textSelector = new ConcreteTextSelector();
  textSelectionListener = new TextSelectionListener();
  textSelector.addSelectionListener(textSelectionListener);
  mouseListener = new MouseListener();
  component = comp;
  component.getOverlays().add(selectionOverlay);
  ed.addGraphicsNodeMouseListener(mouseListener);
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Reports whether the current selection contains any objects.
 */
public boolean isEmpty() {
  return (getSelection() == null);
}
origin: org.apache.xmlgraphics/batik-bridge

public void clearSelection() {
  if (selectionNode == null) {
    return;
  }
  dispatchSelectionEvent(new SelectionEvent
    (null, SelectionEvent.SELECTION_CLEARED, null));
  selectionNode = null;
  selectionNodeRoot = null;
}
origin: fr.avianey.apache-xmlgraphics/batik

if (isDeselectGesture(evt)) {
  if (selectionNode != null) {
    selectionNodeRoot.removeTreeGraphicsNodeChangeListener(this);
  clearSelection();
} else if (mevt != null) {
    (isSelectStartGesture(evt))) {
    if (selectionNode != source) {
      if (selectionNode != null) {
    dispatchSelectionEvent(
        new SelectionEvent(null,
            SelectionEvent.SELECTION_STARTED,
            null));
  } else if (isSelectEndGesture(evt)) {
    if (selectionNode == source)  {
      ((Selectable) source).selectTo(p.getX(), p.getY());
    Object oldSelection = getSelection();
    if (selectionNode != null) {
      Shape newShape;
      newShape = ((Selectable)selectionNode).getHighlightShape();
      dispatchSelectionEvent
        (new SelectionEvent(oldSelection,
                  SelectionEvent.SELECTION_DONE,
                  newShape));
origin: fr.avianey.apache-xmlgraphics/batik

public void changeCompleted (GraphicsNodeChangeEvent gnce) {
  if (selectionNode == null) {
    return;
  }
  Shape newShape =
    ((Selectable)selectionNode).getHighlightShape();
  dispatchSelectionEvent
    (new SelectionEvent(getSelection(),
              SelectionEvent.SELECTION_CHANGED,
              newShape));
}
origin: fr.avianey.apache-xmlgraphics/batik

public void mousePressed(GraphicsNodeMouseEvent evt) {
  if (evt.getSource() instanceof Selectable) {
    textSelector.mousePressed(evt);
  } else if (selectionHighlight != null) {
    textSelector.clearSelection();
  }
}
origin: org.apache.xmlgraphics/batik-swing

/**
 * Creates a new TextSelectionManager.
 */
public TextSelectionManager(JGVTComponent comp,
              EventDispatcher ed) {
  textSelector = new ConcreteTextSelector();
  textSelectionListener = new TextSelectionListener();
  textSelector.addSelectionListener(textSelectionListener);
  mouseListener = new MouseListener();
  component = comp;
  component.getOverlays().add(selectionOverlay);
  ed.addGraphicsNodeMouseListener(mouseListener);
}
origin: apache/batik

/**
 * Reports whether the current selection contains any objects.
 */
public boolean isEmpty() {
  return (getSelection() == null);
}
origin: fr.avianey.apache-xmlgraphics/batik

public void clearSelection() {
  if (selectionNode == null) {
    return;
  }
  dispatchSelectionEvent(new SelectionEvent
    (null, SelectionEvent.SELECTION_CLEARED, null));
  selectionNode = null;
  selectionNodeRoot = null;
}
origin: apache/batik

if (isDeselectGesture(evt)) {
  if (selectionNode != null) {
    selectionNodeRoot.removeTreeGraphicsNodeChangeListener(this);
  clearSelection();
} else if (mevt != null) {
    (isSelectStartGesture(evt))) {
    if (selectionNode != source) {
      if (selectionNode != null) {
    dispatchSelectionEvent(
        new SelectionEvent(null,
            SelectionEvent.SELECTION_STARTED,
            null));
  } else if (isSelectEndGesture(evt)) {
    if (selectionNode == source)  {
      ((Selectable) source).selectTo(p.getX(), p.getY());
    Object oldSelection = getSelection();
    if (selectionNode != null) {
      Shape newShape;
      newShape = ((Selectable)selectionNode).getHighlightShape();
      dispatchSelectionEvent
        (new SelectionEvent(oldSelection,
                  SelectionEvent.SELECTION_DONE,
                  newShape));
origin: apache/batik

public void changeCompleted (GraphicsNodeChangeEvent gnce) {
  if (selectionNode == null) {
    return;
  }
  Shape newShape =
    ((Selectable)selectionNode).getHighlightShape();
  dispatchSelectionEvent
    (new SelectionEvent(getSelection(),
              SelectionEvent.SELECTION_CHANGED,
              newShape));
}
origin: apache/batik

public void mousePressed(GraphicsNodeMouseEvent evt) {
  if (evt.getSource() instanceof Selectable) {
    textSelector.mousePressed(evt);
  } else if (selectionHighlight != null) {
    textSelector.clearSelection();
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

public void mouseClicked(GraphicsNodeMouseEvent evt) {
  checkSelectGesture(evt);
}
origin: apache/batik

/**
 * Creates a new TextSelectionManager.
 */
public TextSelectionManager(JGVTComponent comp,
              EventDispatcher ed) {
  textSelector = new ConcreteTextSelector();
  textSelectionListener = new TextSelectionListener();
  textSelector.addSelectionListener(textSelectionListener);
  mouseListener = new MouseListener();
  component = comp;
  component.getOverlays().add(selectionOverlay);
  ed.addGraphicsNodeMouseListener(mouseListener);
}
org.apache.batik.bridgeConcreteTextSelector

Javadoc

A simple implementation of GraphicsNodeMouseListener for text selection.

Most used methods

  • clearSelection
  • <init>
  • addSelectionListener
    Add a SelectionListener to this Selector's notification list.
  • checkSelectGesture
  • dispatchSelectionEvent
    Reports whether the current selection contains any objects.
  • getSelection
  • isDeselectGesture
  • isSelectAllGesture
  • isSelectContinueGesture
  • isSelectEndGesture
  • isSelectStartGesture
  • mouseClicked
  • isSelectStartGesture,
  • mouseClicked,
  • mouseDragged,
  • mouseEntered,
  • mouseExited,
  • mousePressed,
  • mouseReleased,
  • removeSelectionListener,
  • report,
  • setSelection

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • getSystemService (Context)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • JButton (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now