All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jwebmp.plugins.jstree.enumerations.JSTreePlugins Maven / Gradle / Ivy

There is a newer version: 1.2.2.1-jre17
Show newest version
/*
 * Copyright (C) 2017 GedMarc
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package com.jwebmp.plugins.jstree.enumerations;

/**
 * jsTree has some functionality moved out of the core so you can only use it when you need it.
 * 

* To enable a plugin use the plugins config option and add that plugin's name to the array. *

* For example enabling all the plugins can be done this way: (enable only plugins you need) * * @author GedMarc * @version 1.0 * @since 22 Dec 2016 */ public enum JSTreePlugins { /** * This plugin renders checkbox icons in front of each node, making multiple selection much easier. *

* It also supports tri-state behavior, meaning that if a node has a few of its children checked it will be rendered as undetermined, *

* and state will be propagated up. You can also fine tune the cascading options with the cascade config option. *

* Keep in mind when cascading checkbox will check even disabled nodes. *

*

* Undetermined state is automatically calculated, but if you are using AJAX and loading on demand and want to render a node as underemined pass "undetermined" : true in its * state. */ Checkbox, /** * This plugin makes it possible to right click nodes and shows a list of configurable actions in a menu. *

* You can find all the contextmenu plugin config options in the API. */ ContextMenu, /** * Drag and drop plugin *

* This plugin makes it possible to drag and drop tree nodes and rearrange the tree. *

* You can find all the dnd plugin config options in the API. */ DnD, /** * This plugin makes it possible to load nodes in a single request (used with lazy loading). *

* You can find all the massload plugin config options in the API. */ Massload, /** * This plugin adds the possibility to search for items in the tree and even to show only matching nodes. */ Search, /** * This plugin automatically arranges all sibling nodes according to a comparison config option function, which defaults to alphabetical order. */ Sort, /** * This plugin saves all opened and selected nodes in the user's browser, so when returning to the same tree the previous state will be restored. *

* You can find all the state plugin config options in the API. Make a selection and refresh this page to see the change persisted. */ State, /** * This plugin makes it possible to add predefined types for groups of nodes, which means to easily control nesting rules and icon for each group. *

* To set a node's type you can use set_type or supply a type property with the node's data. *

*

*/ Types, /** * Enforces that no nodes with the same name can coexist as siblings. This plugin has no options, it just prevents renaming and moving nodes to a parent, which already contains * a node with the * same name. */ Unique, /** * Makes each node appear block level which makes selection easier. May cause slow down for large trees in old browsers. */ WholeRow, /** * This plugin adds additional information about selection changes. *

* Once included in the plugins config option, each changed.jstree event data will contain a new property named changed, *

* which will give information about selected and deselected nodes since the last changed.jstree event */ Changed, /** * This plugin overrides the activate_node function (the one that gets called when a user tries to select a node) and enables preventing the function invokation by using a * callback. */ ConditionalSelect; @Override public String toString() { return name().toLowerCase(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy