Codota Logo
DrawingView.isEnabled
Code IndexAdd Codota to your IDE (free)

How to use
isEnabled
method
in
org.jhotdraw.draw.DrawingView

Best Java code snippets using org.jhotdraw.draw.DrawingView.isEnabled (Showing top 17 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  @Override
  public void updateCursor(DrawingView view, Point p) {
    if (view.isEnabled()) {
      view.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
    } else {
      view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    }
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  @Override
  public void updateCursor(DrawingView view, Point p) {
    if (view.isEnabled()) {
      view.setCursor(Cursor.getPredefinedCursor(isEditing() ? Cursor.DEFAULT_CURSOR : Cursor.CROSSHAIR_CURSOR));
    } else {
      view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    }
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void updateCursor(DrawingView view, Point p) {
  if (view.isEnabled()) {
    view.setCursor(Cursor.getPredefinedCursor(isEditing() ? Cursor.DEFAULT_CURSOR : Cursor.CROSSHAIR_CURSOR));
  } else {
    view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void keyTyped(KeyEvent evt) {
  if (getView() != null && getView().isEnabled()) {
    tracker.keyTyped(evt);
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void mouseClicked(MouseEvent evt) {
  if (getView() != null && getView().isEnabled()) {
    tracker.mouseClicked(evt);
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void mouseDragged(MouseEvent evt) {
  if (getView() != null && getView().isEnabled()) {
    tracker.mouseDragged(evt);
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void keyReleased(KeyEvent evt) {
  if (getView() != null && getView().isEnabled()) {
    tracker.keyReleased(evt);
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void mouseReleased(MouseEvent evt) {
  if (getView() != null && getView().isEnabled()) {
    tracker.mouseReleased(evt);
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void keyPressed(KeyEvent e) {
  if (getView() != null && getView().isEnabled()) {
    tracker.keyPressed(e);
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  @Override
  protected void updateEnabledState() {
    if (getView() != null) {
      setEnabled(getView().isEnabled());
    } else {
      setEnabled(false);
    }
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/** Updates the enabled state of this action to reflect the enabled state
 * of the active {@code DrawingView}. If no drawing view is active, this
 * action is disabled.
 */
protected void updateEnabledState() {
  if (getView() != null) {
    setEnabled(getView().isEnabled());
  } else {
    setEnabled(false);
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/** Updates the enabled state of this action to reflect the enabled state
 * of the active {@code DrawingView}. If no drawing view is active, this
 * action is disabled.
 */
protected void updateEnabledState() {
  if (getView() != null) {
    setEnabled(getView().isEnabled()
        && getView().getSelectionCount() > 0);
  } else {
    setEnabled(false);
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void updateEnabledState() {
  if (getView() != null) {
    setEnabled(getView().isEnabled() &&
        getView().getSelectionCount() > 1
        );
  } else {
    setEnabled(false);
  }
}
@Override
origin: net.imagej/ij-ui-swing

  protected boolean maybeSwitchTool(final MouseEvent event) {
    if (activeTool != null && activeTool.isConstructing()) return false;
    anchor = new Point(event.getX(), event.getY());
    JHotDrawTool tool = creationTool;
    final DrawingView view = getView();
    if (view != null && view.isEnabled()) {
      if (view.findHandle(anchor) != null ||
        (view.findFigure(anchor) != null && view.findFigure(anchor)
          .isSelectable()))
      {
        tool = selectionTool;
      }
    }

    if (activeTool != tool) {
      if (activeTool != null) {
        activeTool.deactivate(getEditor());
      }
      if (tool != null) {
        tool.activate(getEditor());
        if (!isActive()) {
          tool.deactivate(getEditor());
        }
      }
      activeTool = tool;
      return true;
    }
    return false;
  }
}
origin: net.imagej/imagej-ui-swing

JHotDrawTool tool = creationTool;
final DrawingView view = getView();
if (view != null && view.isEnabled()) {
  if (view.findHandle(anchor) != null ||
    (view.findFigure(anchor) != null && view.findFigure(anchor)
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

public void updateCursor(DrawingView view, Point p) {
  if (view.isEnabled()) {
    Handle handle = view.findHandle(p);
    if (handle != null) {
      view.setCursor(handle.getCursor());
    } else {
      Figure figure = view.findFigure(p);
      Point2D.Double point = view.viewToDrawing(p);
      Drawing drawing = view.getDrawing();
      while (figure != null && !figure.isSelectable()) {
        figure = drawing.findFigureBehind(point, figure);
      }
      if (figure != null) {
        view.setCursor(figure.getCursor(view.viewToDrawing(p)));
      } else {
        view.setCursor(Cursor.getDefaultCursor());
      }
    }
  } else {
    view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void mousePressed(MouseEvent evt) {
  if (getView() != null && getView().isEnabled()) {
    super.mousePressed(evt);
    DrawingView view = getView();
org.jhotdraw.drawDrawingViewisEnabled

Javadoc

Gets the enabled state of the drawing view. This is a bound property.

Popular methods of DrawingView

  • findFigure
    Finds a figure at the given point.
  • findHandle
    Finds a handle at the given coordinates.
  • addFigureSelectionListener
    Add a listener for selection changes in this DrawingView.
  • addKeyListener
    Adds a key listener to the drawing view.
  • addMouseListener
    Adds a mouse listener to the drawing view.
  • addMouseMotionListener
    Adds a mouse motion listener to the drawing view.
  • addNotify
    Informs the view that it has been added to the specified editor. The view must draw the tool of the
  • addPropertyChangeListener
    Adds a property change listener to the drawing view.
  • addToSelection
    Adds a figure to the current selection.
  • clearSelection
    Clears the current selection.
  • drawingToView
    Converts drawing coordinates to view coordinates.
  • findFiguresWithin
    Returns all figures that lie within the specified bounds. The figures are returned in Z-order from b
  • drawingToView,
  • findFiguresWithin,
  • getActiveHandle,
  • getCompatibleHandles,
  • getComponent,
  • getConstrainer,
  • getDrawing,
  • getDrawingToViewTransform,
  • getEditor

Popular in Java

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • getApplicationContext (Context)
  • onCreateOptionsMenu (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now