Package com.j3d.gen.properties


package com.j3d.gen.properties
The generation of object selection properties and base the bane of my existence.

This is a FloatingPanel meaning it's UI lives within com.j3d.ui.engine.floating.properties

Properties

"properties" are defined by any GObject., Thing or Layer. They are different from fields as they are not used by code and are purely a way for the user to "see" a object's internal property and possibly edit it. The object itself defines what is a property within its constructor how the UI can access said property and any other semantics for property intersection logic.

Properties themselves aren't difficult, in that they can just be thought of as a user-friendly accessor to whatever the object defines the property as. However, for a something like GObject which has concrete extendors, e.g. GTri, those extendors may inherit properties from the base class and add extra properties special to this child class. (See Property and PropertyKey)

Unlike other stuff within com.j3d.gen, the generated property panels don't persist and are always regenerated when the user makes a new selection. The Property instance may be the exact same that the object instance defines, but the panel itself might now hold a single property, then later multiple as the user's selection grows.

Classes

  • HasProperties, an interfaces which allows an object's instance to have properties associated with it. These generally need to be objects that the user cna interact with and not some random class
  • Property, represents a singular property definition. With the following: A property is defined as a property but based on its type may be assigned a different concrete panel from com.j3d.ui.engine.floating.properties.panels
  • PropertyKey, a record that encapsulates the identifying characteristics of a Property. This is primarily used for comparing properties across multiple selected objects to determine which properties are common and can be displayed/edited together. (See PropertyKey for #equals and #hashCode semantics)
  • SelectionPropertiesFilter, an enum representing the options for a combo box with options such as to allow the user to target the properties of a specific object. e.g. instead of targeting SelectionPropertiesFilter.DEFAULT which tries to finder all common properties from GObjects, it can be changed to target only specifically SelectionPropertiesFilter.TRI and likewise.
  • PropertiesUI, the main class that orchestrates the generation and display of property panels for selected objects.

    This class handles:

    • Collecting all properties based on the filter
    • Merging similar properties into a singular panel that can be bulk edited
    • Finding the correct panel subclass that correctly identifies this property
    • Displaying this property.
    The property panel itself is responsible for handling updates and nuances between constant and non-constant properties, and difference between receiving a single property and multiple at once.