Codota Logo
MonitorDevice.isClone
Code IndexAdd Codota to your IDE (free)

How to use
isClone
method
in
com.jogamp.newt.MonitorDevice

Best Java code snippets using com.jogamp.newt.MonitorDevice.isClone (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.jogamp.jogl/jogl-all-noawt

  @Override
  public String toString() {
    boolean preComma = false;
    final StringBuilder sb = new StringBuilder();
    sb.append("Monitor[Id ").append(Display.toHexString(nativeId)).append(" [");
    {
      if( isClone() ) {
        sb.append("clone");
        preComma = true;
      }
      if( isPrimary() ) {
        if( preComma ) {
          sb.append(", ");
        }
        sb.append("primary");
      }
    }
    preComma = false;
    sb.append("], ").append(sizeMM).append(" mm, pixelScale [").append(pixelScale[0]).append(", ")
    .append(pixelScale[1]).append("], viewport ").append(viewportPU).append(" [pixels], ").append(viewportWU)
    .append(" [window], orig ").append(originalMode).append(", curr ")
    .append(currentMode).append(", modeChanged ").append(modeChanged).append(", modeCount ")
    .append(supportedModes.size()).append("]");
    return sb.toString();
  }
}
origin: org.jogamp.jogl/jogl-all-noawt

/**
 * Returns the {@link MonitorDevice} with the highest {@link MonitorDevice#getViewportInWindowUnits() viewport}
 * {@link RectangleImmutable#coverage(RectangleImmutable) coverage} of the given rectangle in window units,
 * which is not a {@link MonitorDevice#isClone() clone}.
 * <p>
 * If no coverage is detected the first {@link MonitorDevice} is returned.
 * </p>
 * @param r arbitrary rectangle in window units
 */
public final MonitorDevice getMainMonitor(final RectangleImmutable r) {
  MonitorDevice res = null;
  float maxCoverage = Float.MIN_VALUE;
  final List<MonitorDevice> monitors = getMonitorDevices();
  final int monitorCount = monitors.size();
  for(int i=0; i<monitorCount; i++) {
    final MonitorDevice monitor = monitors.get(i);
    if( !monitor.isClone() ) {
      final float coverage = monitor.getViewportInWindowUnits().coverage(r);
      if( coverage > maxCoverage ) {
        maxCoverage = coverage;
        res = monitor;
      }
    }
  }
  if( maxCoverage > 0.0f && null != res ) {
    return res;
  }
  return monitors.get(0);
}
origin: org.jogamp.jogl/jogl-all-noawt

for(int i=0; i<monitorCount; i++) {
  final MonitorDevice a = monitors.get(i);
  if( !a.isClone() ) {
    for(int j=i+1; j<monitorCount; j++) {
      final MonitorDevice b = monitors.get(j);
      if( !b.isClone() ) {
        final float coverage = b.getViewport().coverage( a.getViewport() );
        if( FloatUtil.isZero( 1f - coverage, FloatUtil.EPSILON ) ) {
origin: org.jogamp.jogl/jogl-all-noawt

data[idx++] = data.length;
data[idx++] = monitorDevice.getId();
data[idx++] = monitorDevice.isClone() ? 1 : 0;
data[idx++] = monitorDevice.isPrimary() ? 1 : 0;
data[idx++] = monitorDevice.getSizeMM().getWidth();
com.jogamp.newtMonitorDeviceisClone

Popular methods of MonitorDevice

  • getCurrentMode
    Returns the cached current MonitorMode w/o native query. The returned MonitorMode is element of the
  • getSupportedModes
    Returns a list of immutable MonitorModes supported by this monitor. The list is ordered in descendin
  • setCurrentMode
    Set the current com.jogamp.newt.MonitorMode.This method is lifecycle heavy [Window.html#lifecycleHea
  • getId
  • getOriginalMode
    Returns the immutable original com.jogamp.newt.MonitorMode, as used at NEWT initialization. The retu
  • getPixelsPerMM
    Returns the pixels per millimeter value according to the current MonitorMode's SurfaceSize#getResolu
  • getSizeMM
  • getViewport
    Returns the RectangleImmutable portion of the rotated virtual Screen size in pixel units represented
  • getViewportInWindowUnits
    Returns the RectangleImmutable portion of the rotated virtual Screen size in window units represente
  • isModeChangedByUs
    Returns true if the MonitorModehas been changed programmatic via this API only, otherwise false. Not
  • isOriginalMode
  • toString
  • isOriginalMode,
  • toString,
  • unionOfViewports,
  • getScreen,
  • isPrimary,
  • queryCurrentMode

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • getApplicationContext (Context)
  • orElseThrow (Optional)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • ImageIO (javax.imageio)
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