congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ModuleItem.getSoftMaximum
Code IndexAdd Tabnine to your IDE (free)

How to use
getSoftMaximum
method
in
org.scijava.module.ModuleItem

Best Java code snippets using org.scijava.module.ModuleItem.getSoftMaximum (Showing top 7 results out of 315)

origin: org.scijava/scijava-common

@Override
public Number getSoftMax() {
  final Number softMax = toNumber(item.getSoftMaximum());
  if (softMax != null) return softMax;
  return getMax();
}
origin: scijava/scijava-common

@Override
public Number getSoftMax() {
  final Number softMax = toNumber(item.getSoftMaximum());
  if (softMax != null) return softMax;
  return getMax();
}
origin: scijava/scijava-common

@Override
public <T> T getDefaultValue(final ModuleItem<T> item) {
  final T defaultValue = item.getDefaultValue();
  if (defaultValue != null) return defaultValue;
  final T min = item.getMinimumValue();
  if (min != null) return min;
  final T softMin = item.getSoftMinimum();
  if (softMin != null) return softMin;
  final T max = item.getMaximumValue();
  if (max != null) return max;
  final T softMax = item.getSoftMaximum();
  if (softMax != null) return softMax;
  if (Number.class.isAssignableFrom(item.getType())) {
    final T zero = convertService.convert("0", item.getType());
    if (zero != null) return zero;
  }
  // no known default value
  return null;
}
origin: org.scijava/scijava-common

@Override
public <T> T getDefaultValue(final ModuleItem<T> item) {
  final T defaultValue = item.getDefaultValue();
  if (defaultValue != null) return defaultValue;
  final T min = item.getMinimumValue();
  if (min != null) return min;
  final T softMin = item.getSoftMinimum();
  if (softMin != null) return softMin;
  final T max = item.getMaximumValue();
  if (max != null) return max;
  final T softMax = item.getSoftMaximum();
  if (softMax != null) return softMax;
  if (Number.class.isAssignableFrom(item.getType())) {
    final T zero = convertService.convert("0", item.getType());
    if (zero != null) return zero;
  }
  // no known default value
  return null;
}
origin: org.scijava/scijava-common

/** Creates a new module item with the same values as the given item. */
public DefaultMutableModuleItem(final ModuleInfo info,
  final ModuleItem<T> item)
{
  super(info);
  name = item.getName();
  type = item.getType();
  genericType = item.getGenericType();
  ioType = item.getIOType();
  visibility = item.getVisibility();
  required = item.isRequired();
  persisted = item.isPersisted();
  persistKey = item.getPersistKey();
  initializer = item.getInitializer();
  validater = item.getValidater();
  callback = item.getCallback();
  widgetStyle = item.getWidgetStyle();
  minimumValue = item.getMinimumValue();
  maximumValue = item.getMaximumValue();
  softMinimum = item.getSoftMinimum();
  softMaximum = item.getSoftMaximum();
  stepSize = item.getStepSize();
  columnCount = item.getColumnCount();
  final List<T> itemChoices = item.getChoices();
  if (itemChoices != null) choices.addAll(itemChoices);
  label = item.getLabel();
  description = item.getDescription();
}
origin: scijava/scijava-common

/** Creates a new module item with the same values as the given item. */
public DefaultMutableModuleItem(final ModuleInfo info,
  final ModuleItem<T> item)
{
  super(info);
  name = item.getName();
  type = item.getType();
  genericType = item.getGenericType();
  ioType = item.getIOType();
  visibility = item.getVisibility();
  required = item.isRequired();
  persisted = item.isPersisted();
  persistKey = item.getPersistKey();
  initializer = item.getInitializer();
  validater = item.getValidater();
  callback = item.getCallback();
  widgetStyle = item.getWidgetStyle();
  minimumValue = item.getMinimumValue();
  maximumValue = item.getMaximumValue();
  softMinimum = item.getSoftMinimum();
  softMaximum = item.getSoftMaximum();
  stepSize = item.getStepSize();
  columnCount = item.getColumnCount();
  final List<T> itemChoices = item.getChoices();
  if (itemChoices != null) choices.addAll(itemChoices);
  label = item.getLabel();
  description = item.getDescription();
}
origin: scijava/scijava-common

private void assertItem(final String name, final Class<?> type,
  final String label, final ItemIO ioType, final boolean required,
  final boolean persist, final String persistKey, final String style,
  final Object value, final Object min, final Object max,
  final Object softMin, final Object softMax, final Number stepSize,
  final List<?> choices, final ModuleItem<?> item)
{
  assertEquals(name, item.getName());
  assertSame(type, item.getType());
  assertEquals(label, item.getLabel());
  assertSame(ioType, item.getIOType());
  assertEquals(required, item.isRequired());
  assertEquals(persist, item.isPersisted());
  assertEquals(persistKey, item.getPersistKey());
  assertEquals(style, item.getWidgetStyle());
  assertEquals(value, item.getDefaultValue());
  assertEquals(min, item.getMinimumValue());
  assertEquals(max, item.getMaximumValue());
  assertEquals(softMin, item.getSoftMinimum());
  assertEquals(softMax, item.getSoftMaximum());
  assertEquals(stepSize, item.getStepSize());
  assertEquals(choices, item.getChoices());
}
org.scijava.moduleModuleItemgetSoftMaximum

Javadoc

Gets the "soft" maximum value (if applicable).

The soft maximum is a hint for use in bounded scenarios, such as rendering in a user interface with a slider or scroll bar widget; the parameter value will not actually be clamped to the soft bounds, but they may be used in certain circumstances where appropriate.

Popular methods of ModuleItem

  • getName
  • getType
    Gets the type of the item.
  • getWidgetStyle
    Gets the preferred widget style to use when rendering the item in a user interface.
  • getValue
    Gets the item's current value with respect to the given module.
  • isRequired
    Gets whether the item value must be specified (i.e., no default).
  • getColumnCount
    Gets the preferred width of the input field in characters (if applicable).
  • getGenericType
    Gets the type of the item, including Java generic parameters. For many modules, this may be the same
  • getLabel
  • getVisibility
    Gets the visibility of the item.
  • setValue
    Sets the item's current value with respect to the given module.
  • get
  • getChoices
    Gets the list of possible values.
  • get,
  • getChoices,
  • getDefaultValue,
  • getDescription,
  • getIOType,
  • getMaximumValue,
  • getMinimumValue,
  • getPersistKey,
  • getSoftMinimum

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Kernel (java.awt.image)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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