Home /Modules/java/JTree.sleela

JTree.sleela

lib/java/jdk-28/java.desktop/javax/swing/JTree.sleela · 414 line(s) · sleela

<< lib/java/jdk-28/java.desktop/javax/swing/JTree.sleela
   SLeeLa file for the Java type javax.swing.JTree (module java.desktop). One Java type, one SLeeLa file.
   Java Source (JDK 28 API): https://download.java.net/java/early_access/jdk28/docs/api/java.desktop/javax/swing/JTree.html
   Java kind: class; extends javax.swing.JComponent; implements javax.swing.Scrollable, javax.accessibility.Accessible
   Status: members from the JDK 28 API (exact signatures).
   The SLeeLa functions here are produced from that Java Source. No Java source text is copied. >>
#sleela 3.0
material;
import java.jdk-28;

class JTree extends JComponent {
  < ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- >
  << Eleven catalogued attributes with getter/setter pairs. Values are faithful
     to the real origin of the Java type: the Java SE / JDK 28 API by Oracle
     and the OpenJDK community. >>
  String metaVersion = "1.1.0";
  int metaId = 5103;
  String metaAuthor = "Oracle / OpenJDK";
  String metaDate = "2026-11-12";
  String metaCopyright = "GPLv2 with Classpath Exception (OpenJDK)";
  String metaTrademark = "Java";
  String metaCorporation = "Oracle Corporation";
  < metaOrigin: National | <nation> | International | Galactic >
  String metaOrigin = "International";
  String metaBirthDate = "2026-11-12";
  < metaScienceRating: maturity/robustness on a 1..10 scale >
  int metaScienceRating = 9;
  < metaNationalSchedule: a real, citable instrument or "none" >
  String metaNationalSchedule = "Java SE 28 API Specification (JDK 28 early access)";

  String getMetaVersion() { return metaVersion; }
  void setMetaVersion(String v) { metaVersion = v; }
  int getMetaId() { return metaId; }
  void setMetaId(int v) { metaId = v; }
  String getAuthor() { return metaAuthor; }
  void setAuthor(String v) { metaAuthor = v; }
  String getDate() { return metaDate; }
  void setDate(String v) { metaDate = v; }
  String getCopyright() { return metaCopyright; }
  void setCopyright(String v) { metaCopyright = v; }
  String getTrademark() { return metaTrademark; }
  void setTrademark(String v) { metaTrademark = v; }
  String getCorporation() { return metaCorporation; }
  void setCorporation(String v) { metaCorporation = v; }
  String getOrigin() { return metaOrigin; }
  void setOrigin(String v) { metaOrigin = v; }
  String getBirthDate() { return metaBirthDate; }
  void setBirthDate(String v) { metaBirthDate = v; }
  int getScienceRating() { return metaScienceRating; }
  void setScienceRating(int v) { metaScienceRating = v; }
  String getNationalSchedule() { return metaNationalSchedule; }
  void setNationalSchedule(String v) { metaNationalSchedule = v; }

  String javaType = "javax.swing.JTree";
  String javaModule = "java.desktop";
  String javaSource = "https://download.java.net/java/early_access/jdk28/docs/api/java.desktop/javax/swing/JTree.html";
  String javaKind = "class";
  String javaSuper = "javax.swing.JComponent";

  < ---- BEGIN java implementation (ported from the jdk-25 tier by lib/java/jdk-25/tools/jdk28_connect.py) ---- >
  < ---- javax.swing.JTree accessor contract (generated by tools/jdk_api_accessors.py) ---- >
  << State and accessors whose behavior was observed on the JDK by
     tools/ApiAccessorProbe.java: getters returning a constructor argument,
     the initial state of a property, and setter / getter round trips,
     for every probed constructor that determines all of that state.
     Methods beyond these keep their exact-signature stubs. >>
  String heldUIClassID;
  int heldToggleClickCount;
  boolean heldExpandsSelectedPaths;
  int heldLeadSelectionRow;
  boolean heldEditable;
  boolean heldDragEnabled;
  boolean heldScrollableTracksViewportWidth;
  boolean heldScrollableTracksViewportHeight;
  int heldRowCount;
  int heldSelectionCount;
  int heldMinSelectionRow;
  int heldMaxSelectionRow;
  boolean heldEditing;
  boolean heldSelectionEmpty;
  int heldVisibleRowCount;
  boolean heldFixedRowHeight;
  int heldRowHeight;
  boolean heldRootVisible;
  boolean heldShowsRootHandles;
  boolean heldLargeModel;
  boolean heldInvokesStopCellEditing;
  boolean heldScrollsOnExpand;
  public JTree() { this.heldUIClassID = "TreeUI"; this.heldToggleClickCount = 2; this.heldExpandsSelectedPaths = true; this.heldLeadSelectionRow = -1; this.heldEditable = false; this.heldDragEnabled = false; this.heldScrollableTracksViewportWidth = false; this.heldScrollableTracksViewportHeight = false; this.heldRowCount = 4; this.heldSelectionCount = 0; this.heldMinSelectionRow = -1; this.heldMaxSelectionRow = -1; this.heldEditing = false; this.heldSelectionEmpty = true; this.heldVisibleRowCount = 20; this.heldFixedRowHeight = false; this.heldRowHeight = 0; this.heldRootVisible = true; this.heldShowsRootHandles = false; this.heldLargeModel = false; this.heldInvokesStopCellEditing = false; this.heldScrollsOnExpand = true; }
  public java.lang.String getUIClassID() { return this.heldUIClassID; }
  public int getToggleClickCount() { return this.heldToggleClickCount; }
  public boolean getExpandsSelectedPaths() { return this.heldExpandsSelectedPaths; }
  public int getLeadSelectionRow() { return this.heldLeadSelectionRow; }
  public boolean isEditable() { return this.heldEditable; }
  public boolean getDragEnabled() { return this.heldDragEnabled; }
  public boolean getScrollableTracksViewportWidth() { return this.heldScrollableTracksViewportWidth; }
  public boolean getScrollableTracksViewportHeight() { return this.heldScrollableTracksViewportHeight; }
  public int getRowCount() { return this.heldRowCount; }
  public int getSelectionCount() { return this.heldSelectionCount; }
  public int getMinSelectionRow() { return this.heldMinSelectionRow; }
  public int getMaxSelectionRow() { return this.heldMaxSelectionRow; }
  public boolean isEditing() { return this.heldEditing; }
  public boolean isSelectionEmpty() { return this.heldSelectionEmpty; }
  public int getVisibleRowCount() { return this.heldVisibleRowCount; }
  public boolean isFixedRowHeight() { return this.heldFixedRowHeight; }
  public int getRowHeight() { return this.heldRowHeight; }
  public boolean isRootVisible() { return this.heldRootVisible; }
  public boolean getShowsRootHandles() { return this.heldShowsRootHandles; }
  public boolean isLargeModel() { return this.heldLargeModel; }
  public boolean getInvokesStopCellEditing() { return this.heldInvokesStopCellEditing; }
  public boolean getScrollsOnExpand() { return this.heldScrollsOnExpand; }
  < ---- END java implementation ---- >

  < ---- generics (SLeeLa erasure, SLEELA.syntax 16.3 and 38.1) ---- >
  << The class is written without Java type parameters: every type variable and
     every parameterized or package-qualified reference type erases to Any, and
     java.lang.String erases to String. A value of a type parameter travels as
     Any; test it with instanceof and cast it where it is used. The Java type
     parameters are kept as data in JAVA_TYPE_PARAMETERS. An instance may record
     the type arguments its caller means with bindGenericTypeArguments (for an
     ArrayList of String, bind the single name java.lang.String). Nothing is
     checked against them at run time. >>
  static final String JAVA_TYPE_PARAMETERS = "";
  String[] genericTypeArguments = new String[0];
  public static String genericTypeParameters() { return JAVA_TYPE_PARAMETERS; }
  public static int genericTypeParameterCount() { return 0; }
  public static String genericTypeParameterName(int index) { return null; }
  public JTree bindGenericTypeArguments(String[] arguments) { if (arguments == null) { this.genericTypeArguments = new String[0]; } else { this.genericTypeArguments = arguments; } return this; }
  public String genericTypeArgument(int index) { if (index < 0 || index >= arrayLength(genericTypeArguments)) { return null; } return genericTypeArguments[index]; }
  public int genericTypeArgumentCount() { return arrayLength(genericTypeArguments); }

  < ---- BEGIN java declarations (from the JDK 28 API) ---- >
  < constants and static fields (values reflected from the JDK) >
  static final String CELL_RENDERER_PROPERTY = "cellRenderer";
  static final String TREE_MODEL_PROPERTY = "model";
  static final String ROOT_VISIBLE_PROPERTY = "rootVisible";
  static final String SHOWS_ROOT_HANDLES_PROPERTY = "showsRootHandles";
  static final String ROW_HEIGHT_PROPERTY = "rowHeight";
  static final String CELL_EDITOR_PROPERTY = "cellEditor";
  static final String EDITABLE_PROPERTY = "editable";
  static final String LARGE_MODEL_PROPERTY = "largeModel";
  static final String SELECTION_MODEL_PROPERTY = "selectionModel";
  static final String VISIBLE_ROW_COUNT_PROPERTY = "visibleRowCount";
  static final String INVOKES_STOP_CELL_EDITING_PROPERTY = "invokesStopCellEditing";
  static final String SCROLLS_ON_EXPAND_PROPERTY = "scrollsOnExpand";
  static final String TOGGLE_CLICK_COUNT_PROPERTY = "toggleClickCount";
  static final String LEAD_SELECTION_PATH_PROPERTY = "leadSelectionPath";
  static final String ANCHOR_SELECTION_PATH_PROPERTY = "anchorSelectionPath";
  static final String EXPANDS_SELECTED_PATHS_PROPERTY = "expandsSelectedPaths";
  < public and protected instance fields >
  Any treeModel;
  Any selectionModel;
  boolean rootVisible;
  Any cellRenderer;
  int rowHeight;
  boolean showsRootHandles;
  Any selectionRedirector;
  Any cellEditor;
  boolean editable;
  boolean largeModel;
  int visibleRowCount;
  boolean invokesStopCellEditing;
  boolean scrollsOnExpand;
  int toggleClickCount;
  Any treeModelListener;
  < ---- END java declarations ---- >

  < ---- BEGIN java constructors (exact JDK 28 API signatures) ---- >
  @throwable("java.lang.UnsupportedOperationException")
  public JTree(Any[] value) { super("constructor"); }
  @throwable("java.lang.UnsupportedOperationException")
  public JTree(Any value) { super("constructor"); }
  @throwable("java.lang.UnsupportedOperationException")
  public JTree(Any root, boolean asksAllowsChildren) { super("constructor"); }
  < ---- END java constructors ---- >

  < ---- BEGIN java signatures (exact JDK 28 API signatures) ---- >
  << Not yet SLeeLa logic: each method returns the default value of its
     Java return type. @throwable names what Java throws for it (abstract:
     AbstractMethodError, else UnsupportedOperationException, plus the
     declared throws). Write the logic from the Java Source above into the
     java implementation block; the generator then drops the stub. >>
  @JavaProtected
  @throwable("java.lang.UnsupportedOperationException")
  String paramString() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public boolean isExpanded(int row) { return false; }
  @throwable("java.lang.UnsupportedOperationException")
  public boolean isExpanded(Any path) { return false; }
  @throwable("java.lang.UnsupportedOperationException")
  public void makeVisible(Any path) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void updateUI() { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setSelectionModel(Any selectionModel) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setUI(Any ui) { }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getUI() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getSelectionModel() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public String getToolTipText(Any event) { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public void setSelectionRows(int[] rows) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void addSelectionPath(Any path) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void addSelectionPaths(Any[] paths) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void addSelectionRows(int[] rows) { }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getSelectionPath() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public int[] getSelectionRows() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public int getRowForPath(Any path) { return 0; }
  @throwable("java.lang.UnsupportedOperationException")
  public boolean isPathSelected(Any path) { return false; }
  @throwable("java.lang.UnsupportedOperationException")
  public void expandPath(Any path) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void scrollPathToVisible(Any path) { }
  @JavaProtected
  @throwable("java.lang.UnsupportedOperationException")
  void setExpandedState(Any path, boolean state) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void collapsePath(Any path) { }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getClosestPathForLocation(int x, int y) { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getPathForLocation(int x, int y) { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public boolean stopEditing() { return false; }
  @throwable("java.lang.UnsupportedOperationException")
  public void cancelEditing() { }
  @throwable("java.lang.UnsupportedOperationException")
  public void startEditingAtPath(Any path) { }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getEditingPath() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public void removeTreeSelectionListener(Any tsl) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void addTreeSelectionListener(Any tsl) { }
  @JavaProtected
  @throwable("java.lang.UnsupportedOperationException")
  Any[] getPathBetweenRows(int index0, int index1) { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public void removeSelectionPaths(Any[] paths) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void removeSelectionPath(Any path) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void removeSelectionRows(int[] rows) { }
  @throwable("java.lang.UnsupportedOperationException, javax.swing.tree.ExpandVetoException")
  public void fireTreeWillExpand(Any path) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void fireTreeExpanded(Any path) { }
  @throwable("java.lang.UnsupportedOperationException, javax.swing.tree.ExpandVetoException")
  public void fireTreeWillCollapse(Any path) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void fireTreeCollapsed(Any path) { }
  @JavaProtected
  @throwable("java.lang.UnsupportedOperationException")
  boolean removeDescendantSelectedPaths(Any path, boolean includePath) { return false; }
  @JavaProtected
  @throwable("java.lang.UnsupportedOperationException")
  Any getDescendantToggledPaths(Any parent) { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public void setRowHeight(int rowHeight) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setScrollsOnExpand(boolean newValue) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setCellRenderer(Any x) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setCellEditor(Any cellEditor) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setLargeModel(boolean newValue) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setInvokesStopCellEditing(boolean newValue) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setToggleClickCount(int clickCount) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setExpandsSelectedPaths(boolean newValue) { }
  @throwable("java.lang.UnsupportedOperationException")
  public boolean isPathEditable(Any path) { return false; }
  @throwable("java.lang.UnsupportedOperationException")
  public void setSelectionRow(int row) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void addSelectionRow(int row) { }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getLastSelectedPathComponent() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getExpandedDescendants(Any parent) { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public boolean hasBeenExpanded(Any path) { return false; }
  @throwable("java.lang.UnsupportedOperationException")
  public void scrollRowToVisible(int row) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void collapseRow(int row) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setSelectionInterval(int index0, int index1) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void addSelectionInterval(int index0, int index1) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void removeSelectionInterval(int index0, int index1) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void removeSelectionRow(int row) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void addTreeExpansionListener(Any tel) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void removeTreeExpansionListener(Any tel) { }
  @throwable("java.lang.UnsupportedOperationException")
  public Any[] getTreeExpansionListeners() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public void addTreeWillExpandListener(Any tel) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void removeTreeWillExpandListener(Any tel) { }
  @throwable("java.lang.UnsupportedOperationException")
  public Any[] getTreeWillExpandListeners() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public Any[] getTreeSelectionListeners() { return null; }
  @JavaProtected
  @throwable("java.lang.UnsupportedOperationException")
  void fireValueChanged(Any e) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void treeDidChange() { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setVisibleRowCount(int newCount) { }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getNextMatch(String prefix, int startingRow, Any bias) { return null; }
  @JavaProtected
  @throwable("java.lang.UnsupportedOperationException")
  void removeDescendantToggledPaths(Any toRemove) { }
  @throwable("java.lang.UnsupportedOperationException")
  public String convertValueToText(Any value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getCellRenderer() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public void setDragEnabled(boolean b) { }
  @throwable("java.lang.UnsupportedOperationException")
  public final void setDropMode(Any dropMode) { }
  @throwable("java.lang.UnsupportedOperationException")
  public final Any getDropMode() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public final Any getDropLocation() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getPreferredScrollableViewportSize() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public int getScrollableUnitIncrement(Any visibleRect, int orientation, int direction) { return 0; }
  @throwable("java.lang.UnsupportedOperationException")
  public int getScrollableBlockIncrement(Any visibleRect, int orientation, int direction) { return 0; }
  @throwable("java.lang.UnsupportedOperationException")
  protected static Any getDefaultTreeModel() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  protected static Any createTreeModel(Any value) { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public void setRootVisible(boolean rootVisible) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setShowsRootHandles(boolean newValue) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void expandRow(int row) { }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getCellEditor() { return null; }
  @JavaProtected
  @throwable("java.lang.UnsupportedOperationException")
  void clearToggledPaths() { }
  @JavaProtected
  @throwable("java.lang.UnsupportedOperationException")
  Any createTreeModelListener() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public int getClosestRowForLocation(int x, int y) { return 0; }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getRowBounds(int row) { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getPathForRow(int row) { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public boolean isCollapsed(Any path) { return false; }
  @throwable("java.lang.UnsupportedOperationException")
  public boolean isCollapsed(int row) { return false; }
  @throwable("java.lang.UnsupportedOperationException")
  public void setSelectionPaths(Any[] paths) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setAnchorSelectionPath(Any newPath) { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setLeadSelectionPath(Any newPath) { }
  @throwable("java.lang.UnsupportedOperationException")
  public Any[] getSelectionPaths() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getAnchorSelectionPath() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getLeadSelectionPath() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public void setSelectionPath(Any path) { }
  @throwable("java.lang.UnsupportedOperationException")
  public int getRowForLocation(int x, int y) { return 0; }
  @throwable("java.lang.UnsupportedOperationException")
  public boolean isRowSelected(int row) { return false; }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getPathBounds(Any path) { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public void setEditable(boolean flag) { }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getModel() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public void clearSelection() { }
  @throwable("java.lang.UnsupportedOperationException")
  public void setModel(Any newModel) { }
  @throwable("java.lang.UnsupportedOperationException")
  public Any getAccessibleContext() { return null; }
  @throwable("java.lang.UnsupportedOperationException")
  public boolean isVisible(Any path) { return false; }
  < ---- END java signatures ---- >
}