JavaFX Getter Generator - plugin detail

Automatically generates getter and setter methods for JavaFX Properties in a POJO.

NetBeans Plugin - JavaFX Getter Generator
Plugin owner: Tuupertunut
Website: https://github.com/Tuupertunut/JavaFXGetterGenerator
Added: 2017-10-23
License: MIT
Category: Code Generation
Downloaded: 238 times
Rating:
 4.5, by 1 users

Plugin Log Show log

Versions available

Download plugin   Download size: 0.02 MB   Last Update: 2017-10-26

This plugin is also available on the NetBeans Plugin Portal Update Center. Use 'Tools > Plugins' action from the NetBeans IDE main menu for convenient installation of this plugin


What's new in this version

The NBM is now signed.

Verifications for NetBeans versions

8.2 verification PASSED See verification details


Introduction

This is a continuation of rterp's plugin. The original can be found here: JavaFx Property Getter & Setter Generator

This NetBeans plugin will help to generate get/set methods for JavaFX properties that are contained within a POJO.

The standard get/set code generator creates the following get/set methods for a JavaFX property which is not ideal:

private StringProperty name;

public StringProperty getName() { 
    return name;
}

public void setName(StringProperty name) {
    this.name = name;
}

This plugin would create the following methods:

public final String getName() {
    return name.get();
}

public final void setName(String value) {
    name.set(value);
}

public StringProperty nameProperty() {
    return name;
}

It's also possible to use variables with the suffix Property in their names which will create the following methods:

private StringProperty nameProperty;

public final String getName() {
    return nameProperty.get();
}

public final void setName(String value) {
    nameProperty.set(value);
}

public StringProperty nameProperty() {
    return nameProperty;
}

Read-only properties and read-only wrapper types are also supported:

private ReadOnlyStringProperty identifier;

public final String getIdentifier() {
    return identifier.get();
}

public ReadOnlyStringProperty identifierProperty() {
    return identifier;
}
private ReadOnlyStringWrapper identifier;

public final String getIdentifier() {
    return identifier.get();
}

public ReadOnlyStringProperty identifierProperty() {
    return identifier.getReadOnlyProperty();
}

Usage

Press Alt-Insert to get the "Generate" popup menu, and select "Java FX Getter and Setter..." alt tag

Methods for supported property types will automatically be generated.

Supported Property Types

  • StringProperty
  • BooleanProperty
  • DoubleProperty
  • FloatProperty
  • IntegerProperty
  • LongProperty
  • ListProperty
  • MapProperty
  • ObjectProperty
  • SetProperty

Supported Read-only Property Types

  • ReadOnlyStringProperty
  • ReadOnlyBooleanProperty
  • ReadOnlyDoubleProperty
  • ReadOnlyFloatProperty
  • ReadOnlyIntegerProperty
  • ReadOnlyLongProperty
  • ReadOnlyListProperty
  • ReadOnlyMapProperty
  • ReadOnlyObjectProperty
  • ReadOnlySetProperty

Supported Read-only Wrapper Types

  • ReadOnlyStringWrapper
  • ReadOnlyBooleanWrapper
  • ReadOnlyDoubleWrapper
  • ReadOnlyFloatWrapper
  • ReadOnlyIntegerWrapper
  • ReadOnlyLongWrapper
  • ReadOnlyListWrapper
  • ReadOnlyMapWrapper
  • ReadOnlyObjectWrapper
  • ReadOnlySetWrapper

[ You have to be logged in to be able to comment. ]

User Comments

There are no comments yet.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo