Tabnine Logo
ModuleItem.getLabel
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: scijava/scijava-common

private String defaultName(final ModuleItem<?> item) {
  final String label = item.getLabel();
  if (label != null && !label.isEmpty()) return label;
  final String name = item.getName();
  if (name != null && !name.isEmpty()) return name;
  return "Unnamed";
}
origin: org.scijava/scijava-common

@Override
public String getWidgetLabel() {
  // Do this dynamically. Don't cache this result.
  // Some controls change their labels at runtime.
  final String label = item.getLabel();
  if (label != null && !label.isEmpty()) return label;
  final String name = item.getName();
  return name.substring(0, 1).toUpperCase() + name.substring(1);
}
origin: org.scijava/scijava-common

private String defaultName(final ModuleItem<?> item) {
  final String label = item.getLabel();
  if (label != null && !label.isEmpty()) return label;
  final String name = item.getName();
  if (name != null && !name.isEmpty()) return name;
  return "Unnamed";
}
origin: scijava/scijava-common

@Override
public String getWidgetLabel() {
  // Do this dynamically. Don't cache this result.
  // Some controls change their labels at runtime.
  final String label = item.getLabel();
  if (label != null && !label.isEmpty()) return label;
  final String name = item.getName();
  return name.substring(0, 1).toUpperCase() + name.substring(1);
}
origin: org.scijava/scijava-ui-swing

@Override
public boolean isLabeled() {
  final String l = get().getItem().getLabel();
  return l != null && !l.isEmpty();
}
origin: scijava/scijava-common

@Override
public void process(final Module module) {
  if (logService == null || moduleService == null) return;
  final ModuleItem<?> loggerInput = moduleService.getSingleInput(module,
    Logger.class);
  if (loggerInput == null || !loggerInput.isAutoFill()) return;
  String loggerName = loggerInput.getLabel();
  if(loggerName == null || loggerName.isEmpty())
    loggerName = module.getDelegateObject().getClass().getSimpleName();
  Logger logger = logService.subLogger(loggerName);
  final String name = loggerInput.getName();
  module.setInput(name, logger);
  module.resolveInput(name);
}
origin: org.scijava/scijava-common

@Override
public void process(final Module module) {
  if (logService == null || moduleService == null) return;
  final ModuleItem<?> loggerInput = moduleService.getSingleInput(module,
    Logger.class);
  if (loggerInput == null || !loggerInput.isAutoFill()) return;
  String loggerName = loggerInput.getLabel();
  if(loggerName == null || loggerName.isEmpty())
    loggerName = module.getDelegateObject().getClass().getSimpleName();
  Logger logger = logService.subLogger(loggerName);
  final String name = loggerInput.getName();
  module.setInput(name, logger);
  module.resolveInput(name);
}
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.moduleModuleItemgetLabel

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
  • 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.
  • getDefaultValue
    Gets the default value.
  • getChoices,
  • getDefaultValue,
  • getDescription,
  • getIOType,
  • getMaximumValue,
  • getMinimumValue,
  • getPersistKey,
  • getSoftMaximum,
  • getSoftMinimum

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Top Vim plugins
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