|
MoveToCode
|
A collection of helper functions for adding InspectorFields to a custom Inspector More...
Static Public Member Functions | |
| static bool | AreFieldsSame (SerializedProperty settings, List< InspectorFieldData > fieldList) |
| static void | UpdateSettingsList (SerializedProperty settings, List< InspectorFieldData > fieldList) |
| Update list of serialized PropertySettings from new or removed InspectorFields More... | |
| static void | ClearSettingsList (SerializedProperty settings, List< InspectorFieldData > data) |
| Create a new list of serialized PropertySettings from InspectorFields More... | |
| static void | AddFieldsToSettingsList (SerializedProperty settings, List< InspectorFieldData > data) |
| Adds InspectorFields to list of serialized PropertySettings More... | |
| static void | UpdatePropertySettings (SerializedProperty prop, int type, object update) |
| Update a property value in a serialized PropertySettings More... | |
| static List< InspectorFieldData > | GetInspectorFields (System.Object target) |
| static bool | IsPropertyType (SerializedProperty prop, InspectorField.FieldTypes type) |
| Checks the type a property field and returns if it matches the passed in type More... | |
| static void | DisplayPropertyField (SerializedProperty prop) |
| Render a PropertySettings UI field based on the InspectorField Settings More... | |
A collection of helper functions for adding InspectorFields to a custom Inspector
|
static |
Adds InspectorFields to list of serialized PropertySettings
|
static |
|
static |
Create a new list of serialized PropertySettings from InspectorFields
|
static |
Render a PropertySettings UI field based on the InspectorField Settings
|
static |
|
static |
Checks the type a property field and returns if it matches the passed in type
|
static |
Update a property value in a serialized PropertySettings
|
static |
Update list of serialized PropertySettings from new or removed InspectorFields


IBM Wiki
International Business Machines Corporation (IBM) is an American multinational information technology company headquartered in Armonk, New York, with operations in over 170 countries. The company began in 1911, founded in Endicott, New York, as the Computing-Tabulating-Recording Company (CTR) and was renamed "International Business Machines" in 1924.
IBM produces and sells computer hardware, middleware and software, and provides hosting and consulting services in areas ranging from mainframe computers to nanotechnology. IBM is also a major research organization, holding the record for most U.S. patents generated by a business (as of 2019) for 26 consecutive years.[5] Inventions by IBM include the automated teller machine (ATM), the floppy disk, the hard disk drive, the magnetic stripe card, the relational database, the SQL programming language, the UPC barcode, and dynamic random-access memory (DRAM). The IBM mainframe, exemplified by the System/360, was the dominant computing platform during the 1960s and 1970s.
IBM produces and sells computer hardware, middleware and software, and provides hosting and consulting services in areas ranging from mainframe computers to nanotechnology. IBM is also a major research organization, holding the record for most U.S. patents generated by a business (as of 2019) for 26 consecutive years.
IBM has continually shifted business operations by focusing on higher-value, more profitable markets. This includes spinning off printer manufacturer Lexmark in 1991 and the sale of personal computer (ThinkPad/ThinkCentre) and x86-based server businesses to Lenovo (in 2005 and 2014, respectively).
Nicknamed Big Blue, IBM is one of 30 companies included in the Dow Jones Industrial Average and one of the world's largest employers, with (as of 2017) over 380,000 employees, known as "IBMers". At least 70% of IBMers are based outside the United States, and the country with the largest number of IBMers is India.
HEADQUARTERS
IBM is headquartered in Armonk, New York, a community 37 miles (60 km) north of Midtown Manhattan.[58] Its principal building, referred to as CHQ, is a 283,000-square-foot (26,300 m2) glass and stone edifice on a 25-acre (10 ha) parcel amid a 432-acre former apple orchard the company purchased in the mid-1950s.[59] There are two other IBM buildings within walking distance of CHQ: the North Castle office, which previously served as IBM's headquarters; and the Louis V. Gerstner, Jr., Center for Learning[60] (formerly known as IBM Learning Center (ILC)), a resort hotel and training center, which has 182 guest rooms, 31 meeting rooms, and various amenities.[61]
IBM operates in 174 countries as of 2016, with mobility centers in smaller markets areas and major campuses in the larger ones. In New York City, IBM has several offices besides CHQ, including the IBM Watson headquarters at Astor Place in Manhattan. Outside of New York, major campuses in the United States include Austin, Texas; Research Triangle Park (Raleigh-Durham), North Carolina; Rochester, Minnesota; and Silicon Valley, California.
IBM India Private Limited is the Indian subsidiary of IBM, which is headquartered at Bengaluru, Karnataka. It has facilities in Bengaluru, Ahmedabad, Delhi, Kolkata, Mumbai, Chennai, Pune, Gurugram, Noida, Bhubaneshwar, Coimbatore, Visakhapatnam and Hyderabad.
PRODUCTS & SERVICES
IBM has a large and diverse portfolio of products and services. As of 2016, these offerings fall into the categories of cloud computing, Artificial intelligence, commerce, data and analytics, Internet of Things (IoT),[70] IT infrastructure, mobile, and security.[71]
IBM Cloud includes infrastructure as a service (IaaS), software as a service (SaaS) and platform as a service (PaaS) offered through public, private and hybrid cloud delivery models.
Hardware designed by IBM for these categories include IBM's POWER microprocessors, which are employed inside many console gaming systems, including Xbox 360,[75] PlayStation 3, and Nintendo's Wii U.[76][77] IBM Secure Blue is encryption hardware that can be built into microprocessors,[78] and in 2014, the company revealed TrueNorth, a neuromorphic CMOS integrated circuit and announced a $3 billion investment over the following five years to design a neural chip that mimics the human brain, with 10 billion neurons and 100 trillion synapses.
IT outsourcing also represents a major service provided by IBM, with more than 40 data centers worldwide.[81] alphaWorks is IBM's source for emerging software technologies, and SPSS is a software package used for statistical analysis. IBM's Kenexa suite provides employment and retention solutions, and includes the BrassRing, an applicant tracking system used by thousands of companies for recruiting.[82] IBM also owns The Weather Company, which provides weather forecasting and includes weather.com and Weather Underground.


The Manifesto of Futurism, Italian: Manifesto del Futurismo, is a manifesto written by the Italian poet Filippo Tommaso Marinetti and published in 1909. Marinetti expresses an artistic philosophy, Futurism, that was a rejection of the past, and a celebration of speed, machinery, violence, youth and industry; it also advocated the modernization and cultural rejuvenation of Italy.
This manifesto was published well before the occurrence of any of the 20th-century events which are commonly suggested as a potential meaning of this text. Many of them could not even be imagined yet. For example, the Russian Revolutions of 1917 were the first of the sort "described" by article 11, yet the first of those occurred eight years after the Manifesto's publication.
The effect of the manifesto is even more evident in the Italian version. Not one of the words used is casual; if not the precise form, at least the roots of these words recall those more frequently used during the Middle Ages, particularly during the Rinascimento.
The founding manifesto did not contain a positive artistic programme, which the Futurists attempted to create in their subsequent Technical Manifesto of Futurist Painting (1914).[5] This committed them to a "universal dynamism", which was to be directly represented in painting. Objects in reality were not separate from one another or from their surroundings: "The sixteen people around you in a rolling motor bus are in turn and at the same time one, ten four three; they are motionless and they change places... The motor bus rushes into the houses which it passes, and in their turn the houses throw themselves upon the motor bus and are blended with it."


From 'cabbage' to 'soft pear': Ten Swiss-German insults you need to know
by Rebecca SpiessThe Swiss-German language is known for its creativity along with its penchant for the weird.
Here are ten Swiss German insults, put-downs and swear words that you can keep in the top drawer for a special occasion.
Schnure/Schnorre - as in "Halt d'schnorre"
Translating literally as ‘mouth’ or ‘trap’, Schnure/Schnorre is frequently used in common with ‘halt die...’ - i.e. shut your trap.
Existing somewhere in between ‘shut up’ and ‘shut the hell up’, it’s best saved for comfortable situations where you know the intended recipient.
Weichschnäbeler
Mainly popular in the canton of Jura and surrounding regions, it can mean limp beak (as in a duck’s beak) but in reality it means limp penis.
We should probably leave it there - just keep in mind that this is less a medical condition and more of something someone might yell at a football game, so be careful when talking to your doctor.
READ MORE: Nine surprising Swiss-German words you need to know
Gottfridstutz
As a relatively religious country, at least traditionally, it stands to reason that insults involving religion have found a foothold - as blasphemy-loving English speakers no doubt know.
The best possible translation is probably ‘goddamnit’. As with pretty much anything in Swiss German, there are loads of variations - including Gopfertoori, Gopfridstüdeli, Gopfertami, Gopferteli.
Bünzli
This insult – based on a real Swiss surname and probably inspired by a real Swiss Bünzli – applies to those boring people who follow all the rules and make sure everyone else does too.
A Bünzli is the sort of person who would never cross the street when the light is red, who never stays out too late and never gets too drunk.
A Bünzli is also the person most likely to complain to the building president when you dare to do your washing on Sunday, or to ring the police when he sees someone parked in front of a fire hydrant.
The best English translation is probably a 'goody two-shoes', although in this case the more likely attire is socks paired with Adiletten. Yep, you get the idea.
Socks and sandals - topping the Bünzli fashion trends for the tenth year running. Image: Depositphotos
Lulatsch
Translating perhaps most literally as ‘beanpole’, a Lulatsch is someone - usually a man - who is tall, clumsy, most likely sloppy and with little control of their limbs.
There are few theories on the origin of this word, but safe to say that if someone refers to you as a Lulatsch, they don’t mean you’re tall, dark and handsome.
Geistig unterernährt
Translating literally as mentally undernourished, this one probably doesn’t need too much more of an explanation.

This guy has the right idea - sort of. FRANCK FIFE / AFP
Remember, friends don’t let friends forget brain day - so remember to take good care of your most vital organ.
Which brings us to…
Birreweich
Literally translating as ‘soft pear’, a Birreweich is someone who doesn’t have it all together upstairs.
So if a friend calls you a soft pear, it unfortunately doesn’t mean the opposite of geistig unterernährt (mentally undernourished). It means your friend thinks your brain is mush - and it also means you should get some new friends.
Kabis
Meaning cabbage in English (or Weißkohl in high German), Kabis is also slang for nonsense. If someone says “don’t give me that Kabis!”, they’re unlikely to be referring to foodstuff.
In the same vein, Pfyffetechu/Pfyffedechel (tobacco pipe lid) also means nonsense - so now you’ve got two variations.
Nonsense, delicious nonsense. FREDERICK FLORIN / AFP
Tussi
This Swiss-German insult - which is also common throughout much of Germany - is similar to the terms 'bimbo' or 'blonde' in English. This term is reserved for the kind of person who might care a little too much about their appearance and less about pretty much anything else.
It’s also undoubtedly sexist, as it’s rarely if ever used for men.
Apparently inspired from the legend of Tusnelda, Tussi entered the Swiss-German and German mainstream vernacular in the 1990s and has stubbornly remained.
Honourable mentions: Joggi, Globi, Löli, Tschooli, Glon
While some of the above might get you into trouble, depending on the company you keep - there are plenty of light Swiss insults which are likely to build friendships rather than destroy them.
Each of the above - Joggi, Globi, Löli, Tschooli and Glon - are all relatively nice ways of saying someone is silly, without really saying that they are that silly at all.
Joggi, which literally means jester, while Glon is a translation for clown. Löli and Tschooli means that someone is nice but clumsy, while Globi is perhaps Switzerland’s most beloved cartoon character - a blue parrot in a black beret who has a knack for getting himself into silly situations.


MED Majestic Education Digital
CloudBooks
Menu
Go back
Reading 1
Animals in danger
•
Read the text.
•
Write the answers in the blanks to complete the sentences.
1.
The dolphins are very
.
2.
We must
the endangered species and save them from extinction.
3.
The dolphin in danger live in the
.
4.
The most endangered turtles live in
.
5.
There are many types of plants that
.
6.
When you cut the trees in the forest, the
lose their homes.
7.
The World Conservation Union keeps a list of all
.
8.
The best way to save our planet and the animals is to
.
9.
Planet
is our planet, we can keep it healthy and clean.
10.
To keep clean the water for the sea animas we need to
.
Answers
Restart


My name is Immanuel Barboi, a web developer and currently studying in Daystar University doing Computer Science. I was raised in Nairobi, Donholm area to be specific. My brother introduced me to programming and here I am creating websites and making changes to them. I started doing simple basics of programming in youtube while I was still a kid and that is where I developed my passion in programming.
Currently I am in Kenya and hope to go to other countries. I take my work seriously and put every effort in it.. Below here is an image of me.


--- layout: post status: publish published: true title: Podcast 2.32 - Garza Comes to the Ballyard author: display_name: Corey Fineran login: Corey email<EMAIL_ADDRESS>url: '' author_login: Corey author_email<EMAIL_ADDRESS>wordpress_id: 3547 wordpress_url: http://ivyenvy.com/?p=3547 date: '2011-01-11 22:35:46 +0000' date_gmt: '2011-01-12 04:35:46 +0000' categories: - Podcast tags: - Podcast - Rays - Chris Archer - Sam Fuld - Hak-Ju Lee - Tampa - Matt Garza - Fernando Perez - Zach Rosscup - Brandon Guyer - Robinson Chirinos - Cubs Convention comments: [] ---
Andy, Corey and Kurt look at the trade between the Cubs and the Rays that brought Matt Garza, Fernando Perez and Zach Rosscup, while sending Chris Archer, Brandon Guyer, Hak Ju-Lee, Robinson Chirinos and Sam Fuld to Tampa.
Follow us on Twitter, @IvyEnvy this weekend for Jeremy's updates from the Cubs Convention.


Read this documentation in PDF here.
1. Introduction
AdminFaces is an open source project which brings Bootstrap and AdminLTE to your application via a PrimeFaces theme and a JSF responsive
template.
AdminFaces ecosystem is composed by the following projects:
-
Admin Theme: A Primefaces theme based on Bootstrap and Admin LTE where Primefaces components are customized to look like mentioned frameworks.
-
Admin Template: A fully responsive Java Server Faces
admin
template which is also based on Bootstrap and Admin LTE. -
Admin Showcase: A showcase web application, deployed on openshift, which demonstrates AdminFaces main features and components.
-
Admin Designer: The same showcase application with Admin Theme and Admin Template bundled (instead of being library dependencies) in order to make it easier to customize the theme and the template.
-
Admin Starter: A simple starter project to get you started with AdminFaces.
-
Admin Persistence: CRUD operations like a breeze for AdminFaces applications based on Apache DeltaSpike Data module.
-
Admin Starter Tomcat: Admin Starter application for Tomcat.
-
Admin Starter SpringBoot: Admin Starter application using SpringBoot and JoinFaces.
-
Admin Starter Shiro: Admin Starter application using Apache Shiro for authentication.
-
Admin Starter Security: Admin Starter application using
JavaEE 8
security API for authentication and authorization. -
Admin Mobile: A simple Android Studio project which uses Webview to create an hybrid web app based on Admin Showcase.
In subsequent chapters we will drive through each project in detail.
2. Admin Theme
Admin Theme is a PrimeFaces theme where components are styled to look like AdminLTE ones (which in turn are based on Bootstrap).
2.1. Prerequisites
The only pre-requisite is PrimeFaces
and Font Awesome
.
|
Since PrimeFaces
For previous versions or if you need to upgrade FA version you may include it in your pages by using webjars:
and add fontawesome webjar in your classpath:
|
2.2. Usage
To start using the theme you need the following:
-
Add admin theme to your classpath:
<dependency> <groupId>com.github.adminfaces</groupId> <artifactId>admin-theme</artifactId> <version>1.0.0-RC18</version> </dependency>
-
Activate the theme in
web.xml
<context-param> <param-name>primefaces.THEME</param-name> <param-value>admin</param-value> </context-param>
If you use Admin Template the theme already comes activated.
Now PrimeFaces components are styled like Bootstrap and AdminLTE.
| See showcase forms page to get an idea. |
2.3. Architecture
The theme uses less as css pre-processor. Each PrimeFaces component has its own less file:
├── admin-lte │ | │ ├── bootstrap (1) │ │ │ ├── skins (2) │ │ │ └── admin lte less files │ ├── primefaces-admin │ | │ ├─ components (3) │ │ | │ │ ├── accordeon.less │ │ │ │ │ ├── autocomplete.less │ │ │ │ │ └── etc... │ │ │ ├─ theme.less (4) │ │ └─ variables.less
| 1 | Bootstrap variables and mixins are used as reference in AdminLTE and admin theme less files |
| 2 | Built in skins |
| 3 | PrimeFaces components |
| 4 | Components and Admin-LTE less files are included in theme.less |
After compilation it will generate the theme.css with Admin-LTE, Bootstrap and Primefaces components.
| Bootstrap.css (from src/META-INF/resources) is included in theme.less but can be removed via maven classifiers |
| Bootstrap less is not maintained in this project only it’s mixins. |
2.4. Theme classifiers
This project uses maven classifiers to offer multiple faces
(pum intended) of Admin Theme. Below is the description of each classifier and how to use it.
2.4.1. Default (no classifier)
The default theme comes compressed
, with Bootstrap (3.3.7)
embedded and uses JSF resource handling
for loading images and web fonts.
<dependency>
<groupId>com.github.adminfaces</groupId>
<artifactId>admin-theme</artifactId>
<version>1.0.0-RC18</version>
</dependency>
2.4.2. Dev classifier
The dev
classifier will bring a theme.css without minification.
<dependency>
<groupId>com.github.adminfaces</groupId>
<artifactId>admin-theme</artifactId>
<version>1.0.0-RC18</version>
<classifier>dev</classifier>
</dependency>
2.4.3. Without Bootstrap classifier
The without-bootstrap
classifier will bring a theme.css without bootstrap embedded so it’s up to the developer to provide Bootstrap within the application.
<dependency>
<groupId>com.github.adminfaces</groupId>
<artifactId>admin-theme</artifactId>
<version>1.0.0-RC18</version>
<classifier>without-bootstrap</classifier>
</dependency>
2.4.4. Without JSF classifier
The without-jsf
classifier will bring a theme.css without JSF resource handling so the theme can be used on projects (derived from PrimeFaces) without JSF like Prime React, PrimeUI or PrimeNG.
<dependency>
<groupId>com.github.adminfaces</groupId>
<artifactId>admin-theme</artifactId>
<version>1.0.0-RC18</version>
<classifier>without-jsf</classifier>
</dependency>
2.4.5. No Fonts classifier
Since v1.0.0-RC16
web fonts such as glyphicons
and Source Sans Pro
are embedded inside the theme instead of being queried from a CDN.
This makes the theme work offline or in environments with limited access to the internet but on the other hand results in a larger jar file, ~1MB
against ~200kb
when fonts are not in the theme.
So if you want a thinner theme you can use the no-fonts classifier:
<dependency>
<groupId>com.github.adminfaces</groupId>
<artifactId>admin-theme</artifactId>
<version>{docVersion}</version>
<classifier>no-fonts</classifier>
</dependency>
2.5. Avoiding theme caching
Whenever the theme is updated to a new version in the project users may have to clear their browser caches to get the changes of the new theme.
Sometimes a theme update even introduces conflicts and only clearing browser cache fixes them.
To solve this issues you can use a theme classifier called no-cache:
<dependency>
<groupId>com.github.adminfaces</groupId>
<artifactId>admin-theme</artifactId>
<version>1.0.0-RC18</version>
<classifier>no-cache</classifier>
</dependency>
This classifier appends the theme version to the name of theme so you need to change the theme name in web.xml:
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>admin-1.0.0-RC18</param-value>
</context-param>
There is also a no-cache-no-fonts classifier combining both approaches.
|
2.6. Development
To get your hands dirty with admin theme it is recommended to use Admin Designer in combination with Brackets or any tool that compile less
files to css on save.
Using designer, which is backed by wildfly swarm, plus brackets will let you change the components less files and see the results instantly. see this video to see Brackets and Designer in action.
| theme.less is already brackets aware so you just need to change any component less file, save it and see the results in Admin Designer. |
2.7. Snapshots
Theme Snapshots
are published to maven central on each commit, to use it just declare the repository below on your pom.xml
:
<repositories>
<repository>
<snapshots/>
<id>snapshots</id>
<name>libs-snapshot</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
3. Admin Template
Admin Template is a fully responsive Java Server Faces admin template
based on Bootstrap and Admin LTE.
3.1. Features
Below is a non exhaustive list of notable features brought out of the box by this template:
-
Fully responsive
-
Its based on Bootstrap and AdminLTE two well tested and solid frameworks
-
-
Enhanced mobile experience
-
Material design load bar
-
Material design flat buttons
-
Ripple effect based on materialize css
-
Touch enabled menu to slide in/out
-
Auto show and hide navbar based on page scroll
-
Scroll to top
-
-
Automatically activates (highlight) menu based on current page
-
Custom error pages
-
Two menu modes,
left
andhorizontal
based menu -
Configurable, see Configuration
-
Breadcrumb based navigation
-
Layout customization via Control Sidebar
-
High resolution and responsible icons based on Glyphycons and FontAwesome
-
Builtin
dark
andlight
skins -
Back to previous screen when logging in again after session expiration (or accessing a page via url without being logged in)
| Most of the above features can be disabled via configuration mechanism. |
3.2. Usage
Add the following dependency to your classpath:
<dependency>
<groupId>com.github.adminfaces</groupId>
<artifactId>admin-template</artifactId>
<version>1.0.0-RC18</version>
</dependency>
|
Admin template will bring the following transitive dependencies:
Which you can override in your pom.xml as needed. |
With the template dependency in classpath now you can use admin
facelets template into your JSF pages.
3.2.1. Example
Consider the following sample page:
<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
template="/admin.xhtml"> (1)
<ui:define name="head">
<title>Admin Starter</title>
</ui:define>
<ui:define name="logo-lg">
Admin Starter
</ui:define>
<ui:define name="logo-mini">
Admin
</ui:define>
<ui:define name="menu">

Home

General

Cars

</ui:define>
<ui:define name="top-menu">
<ui:include src="/includes/top-bar.xhtml"/>
</ui:define>
<ui:define name="title">

Welcome to the   AdminFaces Starter Project!

Integrating
,
 and

 into your

 application.

</ui:define>
<ui:define name="description">
A page description
</ui:define>
<ui:define name="body">

Page body

</ui:define>
<ui:define name="footer">

Copyright (C) 2017 - AdminFaces

1.0.0

</ui:define>
</ui:composition>
| 1 | /admin.xhtml is the location of the template |
The above page definition renders as follows:
There are also other regions defined in admin.xhtml template, see here.
|
A good practice is to define a template on your application which extends the admin template, see admin-starter application template here. So in your pages you use your template instead of admin. |
3.3. Application template
Instead of repeating sections like menu, logo, head and footer on every page we can create a template inside our application which uses admin.xhtml
as template:
<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
template="/admin.xhtml">
<ui:define name="head">
<title>Admin Starter</title>
<h:outputStylesheet library="css" name="starter.css"/>
</ui:define>
<ui:define name="logo-lg">
Admin Starter
</ui:define>
<ui:define name="logo-mini">
Admin
</ui:define>
<ui:define name="menu">

Home

General

Cars

</ui:define>
<ui:define name="top-menu">
<ui:include src="/includes/top-bar.xhtml"/>
</ui:define>
<ui:define name="footer">

Copyright (C) 2017 - AdminFaces

1.0.0

</ui:define>
</ui:composition>
And now the page can just define its content and title:
<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
template="/WEB-INF/templates/template.xhtml">
<ui:define name="title">
A page title
</ui:define>
<ui:define name="description">
A page description
</ui:define>
<ui:define name="body">

Page body

</ui:define>
</ui:composition>
3.3.1. Switching between left menu and top menu templates
AdminFaces supports two layout modes, one is left based menu and the other is top based menu.
The user can change layout modes via control sidebar but to make it work you have to use LayoutMB to define page template:
<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
template="#{layoutMB.template}">

</ui:composition>
As a convention over configuration LayoutMB will load templates from the following locations:
-
webapp/WEB-INF/templates/template.xhtml
for theleft menu
based template -
webapp/WEB-INF/templates/template-top.xhtml
for horizontal menu layout.
See admin-starer templates for a reference: https://github.com/adminfaces/admin-starter/tree/master/src/main/webapp/WEB-INF/templates
3.4. Configuration
Template configuration is made through admin-config.properties
file present in src/main/resources
folder.
Here are the default values as well as its description:
admin.loginPage=login.xhtml (1) admin.indexPage=index.xhtml (2) admin.dateFormat= (3) admin.breadcrumbSize=5 (4) admin.renderMessages=true (5) admin.renderAjaxStatus=true (6) admin.disableFilter=false (7) admin.renderBreadCrumb=true (8) admin.enableSlideMenu=true (9) admin.enableRipple=true (10) admin.rippleElements= .ripplelink,button.ui-button,.ui-selectlistbox-item,.ui-multiselectlistbox-item,.ui-selectonemenu-label,.ui-selectcheckboxmenu,\ .ui-autocomplete-dropdown, .ui-autocomplete-item ... (the list goes on) (11) admin.skin=skin-blue (12) admin.autoShowNavbar=true (13) admin.ignoredResources= (14) admin.loadingImage=ajaxloadingbar.gif (15) admin.extensionLessUrls=false (16) admin.renderControlSidebar=false (17) admin.controlSidebar.showOnMobile=false (18) admin.controlSidebar.leftMenuTemplate=true (19) admin.controlSidebar.fixedLayout=false (20) admin.controlSidebar.boxedLayout=false (21) admin.controlSidebar.sidebarCollapsed=false (22) admin.controlSidebar.expandOnHover=false (23) admin.controlSidebar.fixed=false (24) admin.controlSidebar.darkSkin=true (25) admin.rippleMobileOnly=true (26) admin.renderMenuSearch=true (27) admin.autoHideMessages=true (28) admin.messagesHideTimeout=2500 (29)
| 1 | login page location (relative to webapp). It will only be used if you configure Admin Session. |
| 2 | index page location. User will be redirected to it when it access app root (contextPath/). |
| 3 | Date format used in error page (500.xhtml), by default it is JVM default format. |
| 4 | Number of breadcrumbs to queue before removing the older ones. |
| 5 | When false, p:messages defined in admin template will not be rendered. |
| 6 | When false ajaxStatus, which triggers the loading bar on every ajax request, will not be rendered. |
| 7 | Disables AdminFilter, responsible for redirecting user after session timeout, sending user to logon page when it is not logged in among other things. |
| 8 | When false, the breadCrumb component, declared in admin template, will not be rendered. |
| 9 | If true will make left menu touch enable (can be closed or opened via touch). Can be enable/disabled per page with <ui:param name="enableSlideMenu" value="false". |
| 10 | When true it will create a wave/ripple effect on elements specified by rippleElements . |
| 11 | A list of comma separated list of (jquery) selector which elements will be affected by ripple effect. |
| 12 | Default template skin. |
| 13 | Automatic shows navbar when users scrolls page up on small screens . Can be enable/disabled per page with <ui:param name="autoShowNavbar" value="false". |
| 14 | Comma separated resources (pages or urls) to be skiped by AdminFilter. Ex: /rest, /pages/car-list. Note that by default the filter skips pages under CONTEXT/public/ folder. |
| 15 | image used for the loading popup. It must be under webapp/resources/images folder. |
| 16 | Removes extension suffix from breadCrumb links. |
| 17 | When true it will activate control sidebar component. |
| 18 | When true control sidebar will be also rendered on mobile devices. |
| 19 | Switches layout between left (default) and top menu. |
| 20 | Toggles fixed layout where navbar is fixed on the page. |
| 21 | Toggles boxed layout which is helpful when working on large screens because it prevents the site from stretching very wide. |
| 22 | When true left sidebar will be collapsed. |
| 23 | When true left sidebar will expand on mouse hover. |
| 24 | When true control sidebar will be fixed on the page. |
| 25 | Changes control sidebar skin between dark and light . |
| 26 | When true the ripple effect will be enabled only on mobile (small) screens. |
| 27 | Enables or disables menu search. |
| 28 | If true PrimeFaces info messages will be hidden after a certain timeout. |
| 29 | Timeout to hide info messages. Note that the timeout is composed by configured timeout + number of words in message. |
| You don’t need to declare all values in your admin-config.properties, you can specify only the ones you need in order to change. |
Since vRC16 config properties can be passed as Java system properties .
|
| Controlsidebar entries (admin.controlSidebar.xxx) will be used only for initial/default values because they will be stored on browser local storage as soon as user changes them. |
3.5. Admin Session
AdminSession is a simple session scoped bean which controls whether user is logged in or not.
public boolean isLoggedIn(){ return isLoggedIn; //always true by default }
By default the user is always logged in and you need to override it (by using bean specialization or via injection and calling setIsLoggedIn()
method) to change its value, see Overriding AdminSession.
When isLoggedIn is false
you got the following mechanisms activated:
-
Access to any page, besides the login, redirects user to login;
-
When session is expired user is redirected to logon and current page (before expiration) is saved so user is redirected back to where it was before session expiration.
| It is up to you to decide whether the user is logged in or not. |
3.5.1. Overriding AdminSession
There are two ways to override AdminSession default value which is specialization and injection.
AdminSession Specialization
A simple way to change AdminSession logged in value is by extending it:
import javax.enterprise.context.SessionScoped;
import javax.enterprise.inject.Specializes;
import com.github.adminfaces.template.session.AdminSession;
import org.omnifaces.util.Faces;
import java.io.Serializable;
@SessionScoped
@Specializes
public class LogonMB extends AdminSession implements Serializable {
private String currentUser;
private String email;
private String password;
private boolean remember;
public void login() throws IOException {
currentUser = email;
addDetailMessage("Logged in successfully as " + email + "");
Faces.getExternalContext().getFlash().setKeepMessages(true);
Faces.redirect("index.xhtml");
}
@Override
public boolean isLoggedIn() {
return currentUser != null;
}
//getters&setters
}
3.5.2. AdminSession Injection
Another way is to inject it into your security authentication logic:
import com.github.adminfaces.template.session.AdminSession;
import org.omnifaces.util.Messages;
import org.omnifaces.util.Faces;
@SessionScoped
@Named("authorizer")
public class CustomAuthorizer implements Serializable {
private String currentUser;
@Inject
AdminSession adminSession;
public void login(String username) {
currentUser = username;
adminSession.setIsLoggedIn(true);
Messages.addInfo(null,"Logged in sucessfully as "+username+"");
Faces.redirect("index.xhtml");
}
}
As isLoggedIn is true by default you need to set it to false on application startup so user is redirected to login page. This step is not needed when using AdminSession Specialization.
|
3.6. Error Pages
The template comes with custom error pages like 403
, 404
, 500
, ViewExpired
and OptimisticLock
.
User is going to be redirected to 500.xhtml whenever a 500 response code is returned in a request.
The page will also be triggered when a Throwable
is raised (and not catch).
Here is how 500 page look like:
User is redirected to 403.xhtml whenever a 403 response code is returned in a request. The page will also be triggered when a com.github.adminfaces.template.exception.AccessDeniedException
is raised.
User will be redirected to 404.xhtml whenever a 404 response code is returned from a request.
When a JSF javax.faces.application.ViewExpiredException
is raised user will be redirected to expired.xhtml.
When a JPA javax.persistence.OptimisticLockException
is thrown user will be redirected to optimistic.xhtml.
3.6.1. Providing custom error pages
You can provide your own custom pages (and other status codes) by configuring them in web.xml, example:
<error-page>
<error-code>404</error-code>
<location>/404.xhtml</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/500.xhtml</location>
</error-page>
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/500.xhtml</location>
</error-page>
3.6.2. Overriding error pages
You can also override error pages by placing the pages (with same name) described in Error Pages section on the root of your application (webapp/
).
3.7. Internationalization
Labels in error pages and control sidebar are provided via JSF resource bundle mechanism.
Following are the default labels in admin resource bundle:
#general admin.version=${project.version} label.go-back=Go back to #403 label.403.header=403 label.403.message=Access denied! You do not have access to the requested page. #404 label.404.header=404 label.404.message=Oops! Page not found #500 label.500.header=500 label.500.message=Oops! Something went wrong label.500.title=Unexpected error label.500.detail=Details #expired label.expired.title=View expired label.expired.message= The requested page could not be recovered. label.expired.click-here= Click here to reload the page. #optimistic label.optimistic.title=Record already updated label.optimistic.message= The requested record has been already updated by another user. label.optimistic.click-here= Click here to reload the updated record from database. #controlsidebar controlsidebar.header=Layout Options controlsidebar.label.restore-defaults=Restore defaults controlsidebar.label.menu-horientation=Left menu layout controlsidebar.txt.menu-horientation=Toggle menu orientation between left and top menu. controlsidebar.label.fixed-layout=Fixed Layout controlsidebar.txt.fixed-layout=Activate the fixed layout, if checked the top bar will be fixed on the page. controlsidebar.label.boxed-layout=Boxed Layout controlsidebar.txt.boxed-layout=Activate the boxed layout. controlsidebar.label.sidebar-collapsed=Collapsed Sidebar controlsidebar.txt.sidebar-collapsed=If checked the sidebar menu will be collapsed. controlsidebar.label.sidebar-expand-hover=Sidebar Expand on Hover controlsidebar.txt.sidebar-expand-hover=If checked the left sidebar will expand on hover. controlsidebar.label.sidebar-slide=Control Sidebar fixed controlsidebar.txt.sidebar-slide=If checked control sidebar will be fixed on the page. controlsidebar.label.sidebar-skin=Dark Sidebar Skin controlsidebar.txt.sidebar-skin=If checked dark skin will be used for control sidebar, otherwise light skin will be used. controlsidebar.header.skins=Skins
|
You can provide your own language bundle adding a file named admin_YOUR_LANGUAGE.properties in your application Don’t forget to add it as |
| You can contribute your language locale to AdminFaces, check here the current supported locales. |
3.8. Control Sidebar
ControlSidebar is a component which provides a panel so user can customize
the template layout:
Options selected by user are stored on browser local storage
so they are remembered no matter the user logs off the application.
3.8.1. Usage
To enable the control sidebar you need to add the following entry in src/main/resources/admin-config.properties
:
admin.renderControlSidebar=true
And then add a link or button on your page which opens the sidebar. The link or button must use data-toggle
attribute:

On admin-starter the link is located on top-bar.xhtml.
Click here to see controlsidebar in action on admin showcase.
By default the control sidebar comes only with the configuration tab but you can define additional tabs by defining controlsidebar-tabs
and controlsidebar-content
on your template. An example can be found on admin-starter template.
|
ControlSidebar is hidden on mobile devices by default. You can change this on admin.controlSidebar.showOnMobile=true Also don’t forget to remove the  |
3.9. BreadCrumbs
Breadcrumbs based navigation indicates the location of the user within the site’s hierarch.
AdminFaces provides a composite component which will manage breadCrumbs as user navigates through the pages.
3.9.1. Usage
There are three ways to use the component, via adm:breadcrumb composite component
, by using a ui:param
or programmatically
.
-
Using via
composite component
To use the composite component just declare the
admin namespace
and provide a title and the link, following is car-form breadCrumb declaration inadmin starter
:car-form.xhtml<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:adm="http://github.com/adminfaces"> <ui:define name="body"> <adm:breadcrumb title="#{empty carFormMB.id ? 'New Car' : 'Car '.concat(carFormMB.id)}" link="car-form.jsf?id=#{carFormMB.id}"/> //other page components </ui:define> </ui:composition>
So when user enters the car-form page a breadCrumb will be created based on currently edited car or 'New Car' label will be used when adding a Car:
The link is the page where user will be redirected when clicking the breadCrumb link.
If the link is not provided then user will be redirected to the page where the breaCrumb is declared. -
Usage via
title ui:param
An easy way, but not so flexible as above, of creating breadCrumbs is to use the
ui:param name="title
on the page, following is admin-starter car-list page:<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:adm="http://github.com/adminfaces"> <ui:param name="title" value="Car listing"/> </ui:composition>
When the title param is present on the page, a breadCrumb with title as ui:param
value
will be added. The breadCrumb link will redirect user to the page where the ui:param is declared.Declare the param as direct child of ui:composion
otherwise it will not work in MyFaces JSF implementation if you e.g declare it insidebody
section. -
Adding breadCrumb
programmatically
To use breadcrumb in Java you need to
@Inject
the BreadCrumbMB component:@Inject private BreadCrumbMB breadCrumbMB; public void add(){ breadCrumbMB.add(new BreadCrumb(link,title)); }
3.9.2. Disable breadCrumbs
You can disable breadCrumbs per page or for all pages.
-
Disable per page
To disable breadCrumbs in a page just declare:
<ui:param name="renderBreadCrumbs" value="false"/>
. For an example see admin starter index page. -
Disable for all pages
Just add
admin.renderBreadCrumb=false
entry in admin-config.properties undersrc/main/resources/
folder. For details see configuration section.
3.10. Snapshots
Template Snapshots
are published to maven central on each commit, to use it just declare the repository below on your pom.xml
:
<repositories>
<repository>
<snapshots/>
<id>snapshots</id>
<name>libs-snapshot</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
4. Admin Starters
Admin Starters are sample projects to get you started with AdminFaces. Following are current starters, access their github README
for running instructions:
-
Admin Starter: The default starter is a simple JavaEE 6(+) application without any persistence layer. You can run it on a JavaEE 6 or newer server and also in wildfly-swarm.
-
Admin Starter Persistence: Admin Starter application with persistence layer based on Apache DeltaSpike Data module via Admin Persistence;
-
Admin Starter Tomcat: Admin Starter application for Tomcat;
-
Admin Starter SpringBoot: Admin Starter application using SpringBoot and JoinFaces.
-
Admin Starter Shiro: Admin Starter application using Apache Shiro for authentication.
| All starters have images published on docker hub so you can easily run them via docker. |
4.1. Demo
A live demo is available on Openshift here: http://admin-starter-admin-starter.1d35.starter-us-east-1.openshiftapps.com/admin-starter/
5. Admin Designer
The aim of Admin Designer is to make it easier to customize Admin theme and Admin Template.
5.1. What is it?
This is the same Admin Showcase application with admin template
and admin theme
bundled inside instead of being project dependencies.
It uses Wildfly Swarm to run the exploded
application so one can change the theme or template and see the modifications without needing to restart the application.
5.2. Objectives
The initial idea was to speed AdminFaces development but it turns out that it can easy contributions
from non Java developers (like designers and frontend developers) as the project is about front end components and layout.
Also another great feature of Admin Designer is the possibility to download the customized project as a maven project.
|
The downloaded project is the Admin Starter with modified admin theme and template embedded in the project.
|
5.3. How it works
In application root directory:
-
First start the application by running the command:
./mvnw wildfly-swarm:run (or mvnw.cmd wildfly-swarm:run)
-
Second edit any less file in directory
src/main/resources/less
. -
Now to compile the application using:
./mvnw compile (or mvnw.cmd compile)
If you don’t want to compile every time you change a less file, use the flag -Dlesscss.watch=true
. Or use a tool like brackets with less extension installed. -
Finally when you’re done you can download the customized
theme
andtemplate
as a sample maven project or as separated jar files;
The changes made to less files should be visible in running application http://localhost:8080/showcase
| There is no need to stop and run the application again. |
You can see this workflow in the following video: https://youtu.be/X1UEpN942s0
6. Admin Persistence
The Admin Persistence module aims to simplify CRUD operations on AdminFaces applications.
| It actually works without AdminFaces. |
6.1. Prerequisites
This module depends on JSF
, CDI
and JPA
and was tested with respective implementations and versions:
JSF |
CDI |
JPA |
Mojarra 2.2 |
Weld 2.3 |
Hibernate 5.0 |
Mojarra 2.2 |
Weld 2.2 |
Hibernate 4.3 |
MyFaces 2.1 |
OpenWebBeans 1.7.4 |
Eclipselink 2.6 |
6.2. Usage
Following are the steps you need to follow in order to use Admin Persistence
:
-
Classpath
First include it in your classpath:
<dependency> <groupId>com.github.adminfaces</groupId> <artifactId>admin-persistence</artifactId> <version>1.0.0</version> </dependency>
Admin persistence will bring the following transitive dependencies:
<dependency> <groupId>org.primefaces</groupId> <artifactId>primefaces</artifactId> <version>6.2</version> </dependency> <dependency> <groupId>org.apache.deltaspike.core</groupId> <artifactId>deltaspike-core-impl</artifactId> <version>1.8.0</version> </dependency> <dependency> <groupId>org.apache.deltaspike.core</groupId> <artifactId>deltaspike-core-api</artifactId> <version>1.8.0</version> </dependency> <dependency> <groupId>org.apache.deltaspike.modules</groupId> <artifactId>deltaspike-data-module-api</artifactId> <version>1.8.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.deltaspike.modules</groupId> <artifactId>deltaspike-data-module-impl</artifactId> <version>1.8.0</version> <scope>compile</scope> </dependency>
Of cource you can override them in your pom.xml as needed.
-
JPA Metamodel
As Admin Persistence uses DeltaSpike
typesafe
criteria you’ll need to generate JPA metamodel. There are various ways to do that, here is a maven plugin example:<plugin> <groupId>com.mysema.maven</groupId> <artifactId>apt-maven-plugin</artifactId> <version>1.1.3</version> <executions> <execution> <id>metamodel</id> <goals> <goal>process</goal> </goals> <configuration> <outputDirectory>target/generated-sources/metamodel</outputDirectory> <processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-jpamodelgen</artifactId> <version>4.3.8.Final</version> </dependency> </dependencies> </plugin>
See this tutorial for configuring it on your IDE. -
Entity Manager
Admin persistence needs an exposed
entity manager
as CDI Bean, you can do that by using a CDI producer:@ApplicationScoped public class EntityManagerProducer { @PersistenceContext EntityManager em; @Produces public EntityManager produce() { return em; } }
-
Persistence Entity
Every JPA entity must be typed as a PersistenceEntity, it is an interface with only a method,
getId()
:import com.github.adminfaces.persistence.model.PersistenceEntity; @Entity @Table(name = "car") public class Car implements PersistenceEntity { @Override public Integer getId() { return id; } }
You can extend
BaseEntity to gainequals()
,hashCode()
andtoString()
. -
Service layer
Now to create a service which will hold your business logic you need to extend CrudService:
@Stateless public class CarService extends CrudService<Car, Integer> { }
Full source code for CarService can be found here. For some examples of CrudService usage see integration tests here. -
Controller
Finally on the controller layer (JSF managed beans) you need to extend CrudMB which will enable CRUD support for your JSF pages:
@Named @ViewScoped public class CarListMB extends CrudMB<Car> implements Serializable { @Inject CarService carService; @Inject @Service CrudService<Car, Integer> crudService; //generic injection @Inject public void initService() { setCrudService(carService); (1) } }
1 Needed by CrudMB otherwise it will throw an exception asking for CrudService initialization. You can use @BeanService annotation (since 1.0.0-RC9) to provide CrudService:
@Named @ViewScoped @BeanService(CarService.class)//use annotation instead of setter injection public class CarListMB extends CrudMB<Car> implements Serializable { }
Full source code for CarListMB can be found here.
6.3. Pagination
Real pagination involves lots of boilerplate code, in admin-persistence it is a matter of using a Primefaces lazy datatable and bind it to the CrudMB list
variable:
<p:dataTable widgetVar="carsTable" var="c" value="#{carListMB.list}"
rows="5" rowKey="#{c.id}"
lazy="true" paginator="true"

| Full source code for this xhtml page can be found here. |
6.4. Pagination filtering
For filtering on the lazy datatable you just need to override configRestrictions
method in the managed bean’s service (the service we set with setCrudService in CarListMB) and add your restrictions based on a filter:
protected Criteria<Car, Car> configRestrictions(Filter<Car> filter) {
Criteria<Car, Car> criteria = criteria();
//create restrictions based on parameters map
if (filter.hasParam("id")) {
criteria.eq(Car_.id, filter.getIntParam("id"));
}
if (filter.hasParam("minPrice") && filter.hasParam("maxPrice")) {
criteria.between(Car_.price, filter.getDoubleParam("minPrice"), filter.getDoubleParam("maxPrice"));
} else if (filter.hasParam("minPrice")) {
criteria.gtOrEq(Car_.price, filter.getDoubleParam("minPrice"));
} else if (filter.hasParam("maxPrice")) {
criteria.ltOrEq(Car_.price, filter.getDoubleParam("maxPrice"));
}
//create restrictions based on filter entity
if (has(filter.getEntity())) {
Car filterEntity = filter.getEntity();
if (has(filterEntity.getModel())) {
criteria.likeIgnoreCase(Car_.model, "%"+filterEntity.getModel());
}
if (has(filterEntity.getPrice())) {
criteria.eq(Car_.price, filterEntity.getPrice());
}
if (has(filterEntity.getName())) {
criteria.likeIgnoreCase(Car_.name, "%"+filterEntity.getName());
}
}
return criteria;
}
|
|
| Any datatable update (ajax or not) will trigger the configRestrictions. |
Besides filtering the filter helper class also holds pagination and sort information.
|
|
By default filters are saved on You can change this behavior by overriding keepFiltersInSession method on your Bean: CarListMB
|
6.5. Sample application
For an example project using Admin Persistence see admin-starter-persistence.
7. Admin Mobile
Admin Mobile is a simple Android Studio project which uses Webview to create an hybrid web app based on Admin Showcase.
The app is a proof of concept to check AdminFaces user experience in mobile apps. The following behaviours will be enabled only on this kind of devices:
-
Loading bar based on google material design;
-
Go to top link at the bottom right corner of the page;
-
Larger icons on panel, dialog and messages;
-
Some components like growl, tabview and datatable are optimized for mobile devices;
-
Ripple/waves effect based on materialize;
-
Slideout menu


Choose a test!
Here is question 1
Here is question 2
Here is question 3
Here is question 4
Here is question 5
Here is question 6


By talking about our miscarriages, we can break the taboo, share experiences to support and help someone going through it. There is scarce information covering what one could experience before, during, and after a miscarriage. Could it hurt? For how long could I bleed? Could the period change afterward? Etc.
MM is a platform where anonymous testimonies are shared. These have been collected from open social media platforms or shared. Have you had a miscarriage? You are far from alone ❤ Please share your experience and break the silence culture!
The page does not distinguish between miscarriages/missed abortions/missed miscarriage/ and, or silent miscarriage. However, at the moment it does not include testimonies of stillbirths (20th week of pregnancy).


Package com.mxgraph.model
Class mxGraphModel
- java.lang.Object
-
- com.mxgraph.util.mxEventSource
-
- com.mxgraph.model.mxGraphModel
-
- All Implemented Interfaces:
mxIGraphModel
,java.io.Serializable
public class mxGraphModel extends mxEventSource implements mxIGraphModel, java.io.Serializable
Extends mxEventSource to implement a graph model. The graph model acts as a wrapper around the cells which are in charge of storing the actual graph datastructure. The model acts as a transactional wrapper with event notification for all changes, whereas the cells contain the atomic operations for updating the actual datastructure. Layers: The cell hierarchy in the model must have a top-level root cell which contains the layers (typically one default layer), which in turn contain the top-level cells of the layers. This means each cell is contained in a layer. If no layers are required, then all new cells should be added to the default layer. Layers are useful for hiding and showing groups of cells, or for placing groups of cells on top of other cells in the display. To identify a layer, thefunction is used. It returns true if the parent of the given cell is the root of the model. This class fires the following events: mxEvent.CHANGE fires when an undoable edit is dispatched. The edit
property contains the mxUndoableEdit. Thechanges
property contains the list of undoable changes inside the undoable edit. The changes property is deprecated, please use edit.getChanges() instead. mxEvent.EXECUTE fires between begin- and endUpdate and after an atomic change was executed in the model. Thechange
property contains the atomic change that was executed. mxEvent.BEGIN_UPDATE fires after the updateLevel was incremented in beginUpdate. This event contains no properties. mxEvent.END_UPDATE fires after the updateLevel was decreased in endUpdate but before any notification or change dispatching. Theedit
property contains the current mxUndoableEdit. mxEvent.BEFORE_UNDO fires before the change is dispatched after the update level has reached 0 in endUpdate. Theedit
property contains the current mxUndoableEdit. mxEvent.UNDO fires after the change was dispatched in endUpdate. Theedit
property contains the current mxUndoableEdit.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
mxGraphModel.Filter
static class
mxGraphModel.mxChildChange
static class
mxGraphModel.mxCollapseChange
static class
mxGraphModel.mxGeometryChange
static class
mxGraphModel.mxRootChange
static class
mxGraphModel.mxStyleChange
static class
mxGraphModel.mxTerminalChange
static class
mxGraphModel.mxValueChange
static class
mxGraphModel.mxVisibleChange
-
Nested classes/interfaces inherited from class com.mxgraph.util.mxEventSource
mxEventSource.mxIEventListener
-
Nested classes/interfaces inherited from interface com.mxgraph.model.mxIGraphModel
mxIGraphModel.mxAtomicGraphModelChange
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.Object>
cells
Maps from Ids to cells.protected boolean
createIds
Specifies if the model should automatically create Ids for new cells.protected mxUndoableEdit
currentEdit
Holds the changes for the current transaction.protected boolean
endingUpdate
protected boolean
maintainEdgeParent
Specifies if edges should automatically be moved into the nearest common ancestor of their terminals.protected int
nextId
Specifies the next Id to be created.protected mxICell
root
Holds the root cell, which in turn contains the cells that represent the layers of the diagram as child cells.protected int
updateLevel
Counter for the depth of nested transactions.-
Fields inherited from class com.mxgraph.util.mxEventSource
eventListeners, eventsEnabled, eventSource
-
-
Constructor Summary
Constructors Constructor Description mxGraphModel()
Constructs a new empty graph model.mxGraphModel(java.lang.Object root)
Constructs a new graph model.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
add(java.lang.Object parent, java.lang.Object child, int index)
Adds the specified child to the parent at the given index.void
beginUpdate()
Increments the updateLevel by one.protected void
cellAdded(java.lang.Object cell)
Invoked after a cell has been added to a parent.protected void
cellRemoved(java.lang.Object cell)
Invoked after a cell has been removed from the model.void
clear()
Sets a new root using createRoot.protected java.lang.Object
cloneCell(java.lang.Object cell, java.util.Map<java.lang.Object,java.lang.Object> mapping, boolean includeChildren)
Inner helper method for cloning cells recursively.java.lang.Object[]
cloneCells(java.lang.Object[] cells, boolean includeChildren)
Returns an array of clones for the given array of cells.protected boolean
collapsedStateForCellChanged(java.lang.Object cell, boolean collapsed)
Inner callback to update the collapsed state of the given mxCell using mxCell.setCollapsed and return the previous collapsed state.boolean
contains(java.lang.Object cell)
Returns true if the model contains the given cell.java.lang.String
createId(java.lang.Object cell)
Creates a new Id for the given cell and increments the global counter for creating new Ids.java.lang.Object
createRoot()
Creates a new root cell with a default layer (child 0).protected mxUndoableEdit
createUndoableEdit()
Creates a new undoable edit.void
endUpdate()
Decrements the updateLevel by one and fires a notification event if the updateLevel reaches 0.void
execute(mxIGraphModel.mxAtomicGraphModelChange change)
Executes the given atomic change and adds it to the current edit.static java.lang.Object[]
filterCells(java.lang.Object[] cells, mxGraphModel.Filter filter)
static java.util.Collection<java.lang.Object>
filterDescendants(mxIGraphModel model, mxGraphModel.Filter filter)
Creates a collection of cells using the visitor pattern.static java.util.Collection<java.lang.Object>
filterDescendants(mxIGraphModel model, mxGraphModel.Filter filter, java.lang.Object parent)
Creates a collection of cells using the visitor pattern.protected mxGeometry
geometryForCellChanged(java.lang.Object cell, mxGeometry geometry)
Inner callback to update the mxGeometry of the given mxCell using mxCell.setGeometry and return the previous mxGeometry.java.lang.Object
getCell(java.lang.String id)
Returns the cell for the specified Id or null if no cell can be found for the given Id.java.util.Map<java.lang.String,java.lang.Object>
getCells()
Returns the internal lookup table that is used to map from Ids to cells.java.lang.Object
getChildAt(java.lang.Object parent, int index)
Returns the child of the given parent at the given index.static java.lang.Object[]
getChildCells(mxIGraphModel model, java.lang.Object parent, boolean vertices, boolean edges)
Returns the children of the given cell that are vertices and/or edges depending on the arguments.int
getChildCount(java.lang.Object cell)
Returns the number of children in the given cell.static java.lang.Object[]
getChildEdges(mxIGraphModel model, java.lang.Object parent)
Returns the child edges of the given parent.static java.lang.Object[]
getChildren(mxIGraphModel model, java.lang.Object parent)
Returns all children of the given cell regardless of their type.static java.lang.Object[]
getChildVertices(mxIGraphModel model, java.lang.Object parent)
Returns the child vertices of the given parent.static java.lang.Object[]
getConnections(mxIGraphModel model, java.lang.Object cell)
Returns all edges connected to this cell without loops.static java.util.Collection<java.lang.Object>
getDescendants(mxIGraphModel model, java.lang.Object parent)
Returns a all descendants of the given cell and the cell itself as a collection.static int
getDirectedEdgeCount(mxIGraphModel model, java.lang.Object cell, boolean outgoing)
Returns the number of incoming or outgoing edges.static int
getDirectedEdgeCount(mxIGraphModel model, java.lang.Object cell, boolean outgoing, java.lang.Object ignoredEdge)
Returns the number of incoming or outgoing edges, ignoring the given edge.java.lang.Object
getEdgeAt(java.lang.Object parent, int index)
Returns the edge of cell at the given index.int
getEdgeCount(java.lang.Object cell)
Returns the number of distinct edges connected to the given cell.static java.lang.Object[]
getEdges(mxIGraphModel model, java.lang.Object cell)
Returns all edges connected to this cell including loops.static java.lang.Object[]
getEdges(mxIGraphModel model, java.lang.Object cell, boolean incoming, boolean outgoing, boolean includeLoops)
Returns all distinct edges connected to this cell.static java.lang.Object[]
getEdgesBetween(mxIGraphModel model, java.lang.Object source, java.lang.Object target)
Returns all edges from the given source to the given target.static java.lang.Object[]
getEdgesBetween(mxIGraphModel model, java.lang.Object source, java.lang.Object target, boolean directed)
Returns all edges between the given source and target pair.mxGeometry
getGeometry(java.lang.Object cell)
Returns the geometry of the given cell.static java.lang.Object[]
getIncomingEdges(mxIGraphModel model, java.lang.Object cell)
Returns the incoming edges of the given cell without loops.java.lang.Object
getNearestCommonAncestor(java.lang.Object cell1, java.lang.Object cell2)
Returns the nearest common ancestor for the specified cells.static java.lang.Object[]
getOpposites(mxIGraphModel model, java.lang.Object[] edges, java.lang.Object terminal)
Returns all opposite cells of terminal for the given edges.static java.lang.Object[]
getOpposites(mxIGraphModel model, java.lang.Object[] edges, java.lang.Object terminal, boolean sources, boolean targets)
Returns all opposite vertices wrt terminal for the given edges, only returning sources and/or targets as specified.mxPoint
getOrigin(java.lang.Object cell)
Returns the absolute, accumulated origin for the children inside the given parent.static java.lang.Object[]
getOutgoingEdges(mxIGraphModel model, java.lang.Object cell)
Returns the outgoing edges of the given cell without loops.java.lang.Object
getParent(java.lang.Object child)
Returns the parent of the given cell.static java.lang.Object[]
getParents(mxIGraphModel model, java.lang.Object[] cells)
java.lang.Object
getRoot()
Returns the root of the model or the topmost parent of the given cell.java.lang.String
getStyle(java.lang.Object cell)
Returns the style of the given cell.java.lang.Object
getTerminal(java.lang.Object edge, boolean isSource)
Returns the source or target terminal of the given edge depending on the value of the boolean parameter.static java.lang.Object[]
getTopmostCells(mxIGraphModel model, java.lang.Object[] cells)
Function: getTopmostCells Returns the topmost cells of the hierarchy in an array that contains no desceandants for eachthat it contains. int
getUpdateLevel()
java.lang.Object
getValue(java.lang.Object cell)
Returns the user object of the given cell.boolean
isAncestor(java.lang.Object parent, java.lang.Object child)
Returns true if the given parent is an ancestor of the given child.boolean
isCollapsed(java.lang.Object cell)
Returns true if the given cell is collapsed.boolean
isConnectable(java.lang.Object cell)
Returns true if the given cell is connectable.boolean
isCreateIds()
Returns true if the model automatically creates Ids and resolves Id collisions.boolean
isEdge(java.lang.Object cell)
Returns true if the given cell is an edge.boolean
isMaintainEdgeParent()
Returns true if the model automatically update parents of edges so that the edge is contained in the nearest-common-ancestor of its terminals.boolean
isVertex(java.lang.Object cell)
Returns true if the given cell is a vertex.boolean
isVisible(java.lang.Object cell)
Returns true if the given cell is visible.void
mergeChildren(mxICell from, mxICell to, boolean cloneAllEdges)
Merges the children of the given cell into the given target cell inside this model.protected void
mergeChildrenImpl(mxICell from, mxICell to, boolean cloneAllEdges, java.util.Hashtable<java.lang.Object,java.lang.Object> mapping)
Clones the children of the source cell into the given target cell in this model and adds an entry to the mapping that maps from the source cell to the target cell with the same id or the clone of the source cell that was inserted into this model.protected java.lang.Object
parentForCellChanged(java.lang.Object cell, java.lang.Object parent, int index)
Inner callback to update the parent of a cell using mxCell.insert on the parent and return the previous parent.java.lang.Object
remove(java.lang.Object cell)
Removes the specified cell from the model.protected void
restoreClone(java.lang.Object clone, java.lang.Object cell, java.util.Map<java.lang.Object,java.lang.Object> mapping)
Inner helper method for restoring the connections in a network of cloned cells.protected java.lang.Object
rootChanged(java.lang.Object root)
Inner callback to change the root of the model and update the internal datastructures, such as cells and nextId.boolean
setCollapsed(java.lang.Object cell, boolean collapsed)
Sets the collapsed state of the given cell.void
setCreateIds(boolean value)
Specifies if the model automatically creates Ids for new cells and resolves Id collisions.mxGeometry
setGeometry(java.lang.Object cell, mxGeometry geometry)
Sets the geometry of the given cell.void
setMaintainEdgeParent(boolean maintainEdgeParent)
Specifies if the model automatically updates parents of edges so that the edge is contained in the nearest-common-ancestor of its terminals.java.lang.Object
setRoot(java.lang.Object root)
Sets the root of the model and resets all structures.java.lang.String
setStyle(java.lang.Object cell, java.lang.String style)
Sets the style of the given cell.java.lang.Object
setTerminal(java.lang.Object edge, java.lang.Object terminal, boolean isSource)
Sets the source or target terminal of the given edge using.static void
setTerminals(mxIGraphModel model, java.lang.Object edge, java.lang.Object source, java.lang.Object target)
Sets the source and target of the given edge in a single atomic change.java.lang.Object
setValue(java.lang.Object cell, java.lang.Object value)
Sets the user object of then given cell.boolean
setVisible(java.lang.Object cell, boolean visible)
Sets the visible state of the given cell.protected java.lang.String
styleForCellChanged(java.lang.Object cell, java.lang.String style)
Inner callback to update the style of the given mxCell using mxCell.setStyle and return the previous style.protected java.lang.Object
terminalForCellChanged(java.lang.Object edge, java.lang.Object terminal, boolean isSource)
Inner helper function to update the terminal of the edge using mxCell.insertEdge and return the previous terminal.java.lang.String
toString()
void
updateEdgeParent(java.lang.Object edge, java.lang.Object root)
Inner helper method to update the parent of the specified edge to the nearest-common-ancestor of its two terminals.void
updateEdgeParents(java.lang.Object cell)
Updates the parents of the edges connected to the given cell and all its descendants so that each edge is contained in the nearest common ancestor.void
updateEdgeParents(java.lang.Object cell, java.lang.Object root)
Updates the parents of the edges connected to the given cell and all its descendants so that the edge is contained in the nearest-common-ancestor.protected java.lang.Object
valueForCellChanged(java.lang.Object cell, java.lang.Object value)
Inner callback to update the user object of the given mxCell using mxCell.setValue and return the previous value, that is, the return value of mxCell.getValue.protected boolean
visibleStateForCellChanged(java.lang.Object cell, boolean visible)
Sets the visible state of the given mxCell using mxVisibleChange and adds the change to the current transaction.-
Methods inherited from class com.mxgraph.util.mxEventSource
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.mxgraph.model.mxIGraphModel
addListener, removeListener, removeListener
-
-
-
-
Field Detail
-
root
protected mxICell root
Holds the root cell, which in turn contains the cells that represent the layers of the diagram as child cells. That is, the actual element of the diagram are supposed to live in the third generation of cells and below.
-
cells
protected java.util.Map<java.lang.String,java.lang.Object> cells
Maps from Ids to cells.
-
maintainEdgeParent
protected boolean maintainEdgeParent
Specifies if edges should automatically be moved into the nearest common ancestor of their terminals. Default is true.
-
createIds
protected boolean createIds
Specifies if the model should automatically create Ids for new cells. Default is true.
-
nextId
protected int nextId
Specifies the next Id to be created. Initial value is 0.
-
currentEdit
protected transient mxUndoableEdit currentEdit
Holds the changes for the current transaction. If the transaction is closed then a new object is created for this variable using createUndoableEdit.
-
updateLevel
protected transient int updateLevel
Counter for the depth of nested transactions. Each call to beginUpdate increments this counter and each call to endUpdate decrements it. When the counter reaches 0, the transaction is closed and the respective events are fired. Initial value is 0.
-
endingUpdate
protected transient boolean endingUpdate
-
-
Constructor Detail
-
mxGraphModel
public mxGraphModel()
Constructs a new empty graph model.
-
mxGraphModel
public mxGraphModel(java.lang.Object root)
Constructs a new graph model. If no root is specified then a new root mxCell with a default layer is created.- Parameters:
root
- Cell that represents the root cell.
-
-
Method Detail
-
clear
public void clear()
Sets a new root using createRoot.
-
getUpdateLevel
public int getUpdateLevel()
-
createRoot
public java.lang.Object createRoot()
Creates a new root cell with a default layer (child 0).
-
getCells
public java.util.Map<java.lang.String,java.lang.Object> getCells()
Returns the internal lookup table that is used to map from Ids to cells.
-
getCell
public java.lang.Object getCell(java.lang.String id)
Returns the cell for the specified Id or null if no cell can be found for the given Id.- Parameters:
id
- A string representing the Id of the cell.- Returns:
- Returns the cell for the given Id.
-
isMaintainEdgeParent
public boolean isMaintainEdgeParent()
Returns true if the model automatically update parents of edges so that the edge is contained in the nearest-common-ancestor of its terminals.- Returns:
- Returns true if the model maintains edge parents.
-
setMaintainEdgeParent
public void setMaintainEdgeParent(boolean maintainEdgeParent)
Specifies if the model automatically updates parents of edges so that the edge is contained in the nearest-common-ancestor of its terminals.- Parameters:
maintainEdgeParent
- Boolean indicating if the model should maintain edge parents.
-
isCreateIds
public boolean isCreateIds()
Returns true if the model automatically creates Ids and resolves Id collisions.- Returns:
- Returns true if the model creates Ids.
-
setCreateIds
public void setCreateIds(boolean value)
Specifies if the model automatically creates Ids for new cells and resolves Id collisions.- Parameters:
value
- Boolean indicating if the model should created Ids.
-
getRoot
public java.lang.Object getRoot()
Description copied from interface:mxIGraphModel
Returns the root of the model or the topmost parent of the given cell.- Specified by:
getRoot
in interfacemxIGraphModel
- Returns:
- Returns the root cell.
-
setRoot
public java.lang.Object setRoot(java.lang.Object root)
Description copied from interface:mxIGraphModel
Sets the root of the model and resets all structures.- Specified by:
setRoot
in interfacemxIGraphModel
- Parameters:
root
- Cell that specifies the new root.
-
rootChanged
protected java.lang.Object rootChanged(java.lang.Object root)
Inner callback to change the root of the model and update the internal datastructures, such as cells and nextId. Returns the previous root.
-
createUndoableEdit
protected mxUndoableEdit createUndoableEdit()
Creates a new undoable edit.
-
cloneCells
public java.lang.Object[] cloneCells(java.lang.Object[] cells, boolean includeChildren)
Description copied from interface:mxIGraphModel
Returns an array of clones for the given array of cells. Depending on the value of includeChildren, a deep clone is created for each cell. Connections are restored based if the corresponding cell is contained in the passed in array.- Specified by:
cloneCells
in interfacemxIGraphModel
- Parameters:
cells
- Array of cells to be cloned.includeChildren
- Boolean indicating if the cells should be cloned with all descendants.- Returns:
- Returns a cloned array of cells.
-
cloneCell
protected java.lang.Object cloneCell(java.lang.Object cell, java.util.Map<java.lang.Object,java.lang.Object> mapping, boolean includeChildren) throws java.lang.CloneNotSupportedException
Inner helper method for cloning cells recursively.- Throws:
java.lang.CloneNotSupportedException
-
restoreClone
protected void restoreClone(java.lang.Object clone, java.lang.Object cell, java.util.Map<java.lang.Object,java.lang.Object> mapping)
Inner helper method for restoring the connections in a network of cloned cells.
-
isAncestor
public boolean isAncestor(java.lang.Object parent, java.lang.Object child)
Description copied from interface:mxIGraphModel
Returns true if the given parent is an ancestor of the given child.- Specified by:
isAncestor
in interfacemxIGraphModel
- Parameters:
parent
- Cell that specifies the parent.child
- Cell that specifies the child.- Returns:
- Returns true if child is an ancestor of parent.
-
contains
public boolean contains(java.lang.Object cell)
Description copied from interface:mxIGraphModel
Returns true if the model contains the given cell.- Specified by:
contains
in interfacemxIGraphModel
- Parameters:
cell
- Cell to be checked.- Returns:
- Returns true if the cell is in the model.
-
getParent
public java.lang.Object getParent(java.lang.Object child)
Description copied from interface:mxIGraphModel
Returns the parent of the given cell.- Specified by:
getParent
in interfacemxIGraphModel
- Parameters:
child
- Cell whose parent should be returned.- Returns:
- Returns the parent of the given cell.
-
add
public java.lang.Object add(java.lang.Object parent, java.lang.Object child, int index)
Description copied from interface:mxIGraphModel
Adds the specified child to the parent at the given index. If no index is specified then the child is appended to the parent's array of children.- Specified by:
add
in interfacemxIGraphModel
- Parameters:
parent
- Cell that specifies the parent to contain the child.child
- Cell that specifies the child to be inserted.index
- Integer that specifies the index of the child.- Returns:
- Returns the inserted child.
-
cellAdded
protected void cellAdded(java.lang.Object cell)
Invoked after a cell has been added to a parent. This recursively creates an Id for the new cell and/or resolves Id collisions.- Parameters:
cell
- Cell that has been added.
-
createId
public java.lang.String createId(java.lang.Object cell)
Creates a new Id for the given cell and increments the global counter for creating new Ids.- Parameters:
cell
- Cell for which a new Id should be created.- Returns:
- Returns a new Id for the given cell.
-
remove
public java.lang.Object remove(java.lang.Object cell)
Description copied from interface:mxIGraphModel
Removes the specified cell from the model. This operation will remove the cell and all of its children from the model.- Specified by:
remove
in interfacemxIGraphModel
- Parameters:
cell
- Cell that should be removed.- Returns:
- Returns the removed cell.
-
cellRemoved
protected void cellRemoved(java.lang.Object cell)
Invoked after a cell has been removed from the model. This recursively removes the cell from its terminals and removes the mapping from the Id to the cell.- Parameters:
cell
- Cell that has been removed.
-
parentForCellChanged
protected java.lang.Object parentForCellChanged(java.lang.Object cell, java.lang.Object parent, int index)
Inner callback to update the parent of a cell using mxCell.insert on the parent and return the previous parent.
-
getChildCount
public int getChildCount(java.lang.Object cell)
Description copied from interface:mxIGraphModel
Returns the number of children in the given cell.- Specified by:
getChildCount
in interfacemxIGraphModel
- Parameters:
cell
- Cell whose number of children should be returned.- Returns:
- Returns the number of children in the given cell.
-
getChildAt
public java.lang.Object getChildAt(java.lang.Object parent, int index)
Description copied from interface:mxIGraphModel
Returns the child of the given parent at the given index.- Specified by:
getChildAt
in interfacemxIGraphModel
- Parameters:
parent
- Cell that represents the parent.index
- Integer that specifies the index of the child to be returned.- Returns:
- Returns the child at index in parent.
-
getTerminal
public java.lang.Object getTerminal(java.lang.Object edge, boolean isSource)
Description copied from interface:mxIGraphModel
Returns the source or target terminal of the given edge depending on the value of the boolean parameter.- Specified by:
getTerminal
in interfacemxIGraphModel
- Parameters:
edge
- Cell that specifies the edge.isSource
- Boolean indicating which end of the edge should be returned.- Returns:
- Returns the source or target of the given edge.
-
setTerminal
public java.lang.Object setTerminal(java.lang.Object edge, java.lang.Object terminal, boolean isSource)
Description copied from interface:mxIGraphModel
Sets the source or target terminal of the given edge using.- Specified by:
setTerminal
in interfacemxIGraphModel
- Parameters:
edge
- Cell that specifies the edge.terminal
- Cell that specifies the new terminal.isSource
- Boolean indicating if the terminal is the new source or target terminal of the edge.- Returns:
- Returns the new terminal.
-
terminalForCellChanged
protected java.lang.Object terminalForCellChanged(java.lang.Object edge, java.lang.Object terminal, boolean isSource)
Inner helper function to update the terminal of the edge using mxCell.insertEdge and return the previous terminal.
-
updateEdgeParents
public void updateEdgeParents(java.lang.Object cell)
Updates the parents of the edges connected to the given cell and all its descendants so that each edge is contained in the nearest common ancestor.- Parameters:
cell
- Cell whose edges should be checked and updated.
-
updateEdgeParents
public void updateEdgeParents(java.lang.Object cell, java.lang.Object root)
Updates the parents of the edges connected to the given cell and all its descendants so that the edge is contained in the nearest-common-ancestor.- Parameters:
cell
- Cell whose edges should be checked and updated.root
- Root of the cell hierarchy that contains all cells.
-
updateEdgeParent
public void updateEdgeParent(java.lang.Object edge, java.lang.Object root)
Inner helper method to update the parent of the specified edge to the nearest-common-ancestor of its two terminals.- Parameters:
edge
- Specifies the edge to be updated.root
- Current root of the model.
-
getOrigin
public mxPoint getOrigin(java.lang.Object cell)
Returns the absolute, accumulated origin for the children inside the given parent.
-
getNearestCommonAncestor
public java.lang.Object getNearestCommonAncestor(java.lang.Object cell1, java.lang.Object cell2)
Returns the nearest common ancestor for the specified cells.- Parameters:
cell1
- Cell that specifies the first cell in the tree.cell2
- Cell that specifies the second cell in the tree.- Returns:
- Returns the nearest common ancestor of the given cells.
-
getEdgeCount
public int getEdgeCount(java.lang.Object cell)
Description copied from interface:mxIGraphModel
Returns the number of distinct edges connected to the given cell.- Specified by:
getEdgeCount
in interfacemxIGraphModel
- Parameters:
cell
- Cell that represents the vertex.- Returns:
- Returns the number of edges connected to cell.
-
getEdgeAt
public java.lang.Object getEdgeAt(java.lang.Object parent, int index)
Description copied from interface:mxIGraphModel
Returns the edge of cell at the given index.- Specified by:
getEdgeAt
in interfacemxIGraphModel
- Parameters:
parent
- Cell that specifies the vertex.index
- Integer that specifies the index of the edge to return.- Returns:
- Returns the edge at the given index.
-
isVertex
public boolean isVertex(java.lang.Object cell)
Description copied from interface:mxIGraphModel
Returns true if the given cell is a vertex.- Specified by:
isVertex
in interfacemxIGraphModel
- Parameters:
cell
- Cell that represents the possible vertex.- Returns:
- Returns true if the given cell is a vertex.
-
isEdge
public boolean isEdge(java.lang.Object cell)
Description copied from interface:mxIGraphModel
Returns true if the given cell is an edge.- Specified by:
isEdge
in interfacemxIGraphModel
- Parameters:
cell
- Cell that represents the possible edge.- Returns:
- Returns true if the given cell is an edge.
-
isConnectable
public boolean isConnectable(java.lang.Object cell)
Description copied from interface:mxIGraphModel
Returns true if the given cell is connectable.- Specified by:
isConnectable
in interfacemxIGraphModel
- Parameters:
cell
- Cell whose connectable state should be returned.- Returns:
- Returns the connectable state of the given cell.
-
getValue
public java.lang.Object getValue(java.lang.Object cell)
Description copied from interface:mxIGraphModel
Returns the user object of the given cell.- Specified by:
getValue
in interfacemxIGraphModel
- Parameters:
cell
- Cell whose user object should be returned.- Returns:
- Returns the user object of the given cell.
-
setValue
public java.lang.Object setValue(java.lang.Object cell, java.lang.Object value)
Description copied from interface:mxIGraphModel
Sets the user object of then given cell.- Specified by:
setValue
in interfacemxIGraphModel
- Parameters:
cell
- Cell whose user object should be changed.value
- Object that defines the new user object.- Returns:
- Returns the new value.
-
valueForCellChanged
protected java.lang.Object valueForCellChanged(java.lang.Object cell, java.lang.Object value)
Inner callback to update the user object of the given mxCell using mxCell.setValue and return the previous value, that is, the return value of mxCell.getValue.
-
getGeometry
public mxGeometry getGeometry(java.lang.Object cell)
Description copied from interface:mxIGraphModel
Returns the geometry of the given cell.- Specified by:
getGeometry
in interfacemxIGraphModel
- Parameters:
cell
- Cell whose geometry should be returned.- Returns:
- Returns the geometry of the given cell.
-
setGeometry
public mxGeometry setGeometry(java.lang.Object cell, mxGeometry geometry)
Description copied from interface:mxIGraphModel
Sets the geometry of the given cell.- Specified by:
setGeometry
in interfacemxIGraphModel
- Parameters:
cell
- Cell whose geometry should be changed.geometry
- Object that defines the new geometry.- Returns:
- Returns the new geometry.
-
geometryForCellChanged
protected mxGeometry geometryForCellChanged(java.lang.Object cell, mxGeometry geometry)
Inner callback to update the mxGeometry of the given mxCell using mxCell.setGeometry and return the previous mxGeometry.
-
getStyle
public java.lang.String getStyle(java.lang.Object cell)
Description copied from interface:mxIGraphModel
Returns the style of the given cell.- Specified by:
getStyle
in interfacemxIGraphModel
- Parameters:
cell
- Cell whose style should be returned.- Returns:
- Returns the style of the given cell.
-
setStyle
public java.lang.String setStyle(java.lang.Object cell, java.lang.String style)
Description copied from interface:mxIGraphModel
Sets the style of the given cell.- Specified by:
setStyle
in interfacemxIGraphModel
- Parameters:
cell
- Cell whose style should be changed.style
- String of the form stylename[;key=value] to specify the new cell style.- Returns:
- Returns the new style.
-
styleForCellChanged
protected java.lang.String styleForCellChanged(java.lang.Object cell, java.lang.String style)
Inner callback to update the style of the given mxCell using mxCell.setStyle and return the previous style.
-
isCollapsed
public boolean isCollapsed(java.lang.Object cell)
Description copied from interface:mxIGraphModel
Returns true if the given cell is collapsed.- Specified by:
isCollapsed
in interfacemxIGraphModel
- Parameters:
cell
- Cell whose collapsed state should be returned.- Returns:
- Returns the collapsed state of the given cell.
-
setCollapsed
public boolean setCollapsed(java.lang.Object cell, boolean collapsed)
Description copied from interface:mxIGraphModel
Sets the collapsed state of the given cell.- Specified by:
setCollapsed
in interfacemxIGraphModel
- Parameters:
cell
- Cell whose collapsed state should be changed.collapsed
- Boolean that specifies the new collpased state.- Returns:
- Returns the new collapsed state.
-
collapsedStateForCellChanged
protected boolean collapsedStateForCellChanged(java.lang.Object cell, boolean collapsed)
Inner callback to update the collapsed state of the given mxCell using mxCell.setCollapsed and return the previous collapsed state.
-
isVisible
public boolean isVisible(java.lang.Object cell)
Description copied from interface:mxIGraphModel
Returns true if the given cell is visible.- Specified by:
isVisible
in interfacemxIGraphModel
- Parameters:
cell
- Cell whose visible state should be returned.- Returns:
- Returns the visible state of the given cell.
-
setVisible
public boolean setVisible(java.lang.Object cell, boolean visible)
Description copied from interface:mxIGraphModel
Sets the visible state of the given cell.- Specified by:
setVisible
in interfacemxIGraphModel
- Parameters:
cell
- Cell whose visible state should be changed.visible
- Boolean that specifies the new visible state.- Returns:
- Returns the new visible state.
-
visibleStateForCellChanged
protected boolean visibleStateForCellChanged(java.lang.Object cell, boolean visible)
Sets the visible state of the given mxCell using mxVisibleChange and adds the change to the current transaction.
-
execute
public void execute(mxIGraphModel.mxAtomicGraphModelChange change)
Executes the given atomic change and adds it to the current edit.- Parameters:
change
- Atomic change to be executed.
-
beginUpdate
public void beginUpdate()
Description copied from interface:mxIGraphModel
Increments the updateLevel by one. The event notification is queued until updateLevel reaches 0 by use of endUpdate.- Specified by:
beginUpdate
in interfacemxIGraphModel
-
endUpdate
public void endUpdate()
Description copied from interface:mxIGraphModel
Decrements the updateLevel by one and fires a notification event if the updateLevel reaches 0.- Specified by:
endUpdate
in interfacemxIGraphModel
-
mergeChildren
public void mergeChildren(mxICell from, mxICell to, boolean cloneAllEdges) throws java.lang.CloneNotSupportedException
Merges the children of the given cell into the given target cell inside this model. All cells are cloned unless there is a corresponding cell in the model with the same id, in which case the source cell is ignored and all edges are connected to the corresponding cell in this model. Edges are considered to have no identity and are always cloned unless the cloneAllEdges flag is set to false, in which case edges with the same id in the target model are reconnected to reflect the terminals of the source edges.- Parameters:
from
-to
-cloneAllEdges
-- Throws:
java.lang.CloneNotSupportedException
-
mergeChildrenImpl
protected void mergeChildrenImpl(mxICell from, mxICell to, boolean cloneAllEdges, java.util.Hashtable<java.lang.Object,java.lang.Object> mapping) throws java.lang.CloneNotSupportedException
Clones the children of the source cell into the given target cell in this model and adds an entry to the mapping that maps from the source cell to the target cell with the same id or the clone of the source cell that was inserted into this model.- Throws:
java.lang.CloneNotSupportedException
-
getDirectedEdgeCount
public static int getDirectedEdgeCount(mxIGraphModel model, java.lang.Object cell, boolean outgoing)
Returns the number of incoming or outgoing edges.- Parameters:
model
- Graph model that contains the connection data.cell
- Cell whose edges should be counted.outgoing
- Boolean that specifies if the number of outgoing or incoming edges should be returned.- Returns:
- Returns the number of incoming or outgoing edges.
-
getDirectedEdgeCount
public static int getDirectedEdgeCount(mxIGraphModel model, java.lang.Object cell, boolean outgoing, java.lang.Object ignoredEdge)
Returns the number of incoming or outgoing edges, ignoring the given edge.- Parameters:
model
- Graph model that contains the connection data.cell
- Cell whose edges should be counted.outgoing
- Boolean that specifies if the number of outgoing or incoming edges should be returned.ignoredEdge
- Object that represents an edge to be ignored.- Returns:
- Returns the number of incoming or outgoing edges.
-
getEdges
public static java.lang.Object[] getEdges(mxIGraphModel model, java.lang.Object cell)
Returns all edges connected to this cell including loops.- Parameters:
model
- Model that contains the connection information.cell
- Cell whose connections should be returned.- Returns:
- Returns the array of connected edges for the given cell.
-
getConnections
public static java.lang.Object[] getConnections(mxIGraphModel model, java.lang.Object cell)
Returns all edges connected to this cell without loops.- Parameters:
model
- Model that contains the connection information.cell
- Cell whose connections should be returned.- Returns:
- Returns the connected edges for the given cell.
-
getIncomingEdges
public static java.lang.Object[] getIncomingEdges(mxIGraphModel model, java.lang.Object cell)
Returns the incoming edges of the given cell without loops.- Parameters:
model
- Graphmodel that contains the edges.cell
- Cell whose incoming edges should be returned.- Returns:
- Returns the incoming edges for the given cell.
-
getOutgoingEdges
public static java.lang.Object[] getOutgoingEdges(mxIGraphModel model, java.lang.Object cell)
Returns the outgoing edges of the given cell without loops.- Parameters:
model
- Graphmodel that contains the edges.cell
- Cell whose outgoing edges should be returned.- Returns:
- Returns the outgoing edges for the given cell.
-
getEdges
public static java.lang.Object[] getEdges(mxIGraphModel model, java.lang.Object cell, boolean incoming, boolean outgoing, boolean includeLoops)
Returns all distinct edges connected to this cell.- Parameters:
model
- Model that contains the connection information.cell
- Cell whose connections should be returned.incoming
- Specifies if incoming edges should be returned.outgoing
- Specifies if outgoing edges should be returned.includeLoops
- Specifies if loops should be returned.- Returns:
- Returns the array of connected edges for the given cell.
-
getEdgesBetween
public static java.lang.Object[] getEdgesBetween(mxIGraphModel model, java.lang.Object source, java.lang.Object target)
Returns all edges from the given source to the given target.- Parameters:
model
- The graph model that contains the graph.source
- Object that defines the source cell.target
- Object that defines the target cell.- Returns:
- Returns all edges from source to target.
-
getEdgesBetween
public static java.lang.Object[] getEdgesBetween(mxIGraphModel model, java.lang.Object source, java.lang.Object target, boolean directed)
Returns all edges between the given source and target pair. If directed is true, then only edges from the source to the target are returned, otherwise, all edges between the two cells are returned.- Parameters:
model
- The graph model that contains the graph.source
- Object that defines the source cell.target
- Object that defines the target cell.directed
- Boolean that specifies if the direction of the edge should be taken into account.- Returns:
- Returns all edges between the given source and target.
-
getOpposites
public static java.lang.Object[] getOpposites(mxIGraphModel model, java.lang.Object[] edges, java.lang.Object terminal)
Returns all opposite cells of terminal for the given edges.- Parameters:
model
- Model that contains the connection information.edges
- Array of edges to be examined.terminal
- Cell that specifies the known end of the edges.- Returns:
- Returns the opposite cells of the given terminal.
-
getOpposites
public static java.lang.Object[] getOpposites(mxIGraphModel model, java.lang.Object[] edges, java.lang.Object terminal, boolean sources, boolean targets)
Returns all opposite vertices wrt terminal for the given edges, only returning sources and/or targets as specified. The result is returned as an array of mxCells.- Parameters:
model
- Model that contains the connection information.edges
- Array of edges to be examined.terminal
- Cell that specifies the known end of the edges.sources
- Boolean that specifies if source terminals should be contained in the result. Default is true.targets
- Boolean that specifies if target terminals should be contained in the result. Default is true.- Returns:
- Returns the array of opposite terminals for the given edges.
-
setTerminals
public static void setTerminals(mxIGraphModel model, java.lang.Object edge, java.lang.Object source, java.lang.Object target)
Sets the source and target of the given edge in a single atomic change.- Parameters:
edge
- Cell that specifies the edge.source
- Cell that specifies the new source terminal.target
- Cell that specifies the new target terminal.
-
getChildren
public static java.lang.Object[] getChildren(mxIGraphModel model, java.lang.Object parent)
Returns all children of the given cell regardless of their type.- Parameters:
model
- Model that contains the hierarchical information.parent
- Cell whose child vertices or edges should be returned.- Returns:
- Returns the child vertices and/or edges of the given parent.
-
getChildVertices
public static java.lang.Object[] getChildVertices(mxIGraphModel model, java.lang.Object parent)
Returns the child vertices of the given parent.- Parameters:
model
- Model that contains the hierarchical information.parent
- Cell whose child vertices should be returned.- Returns:
- Returns the child vertices of the given parent.
-
getChildEdges
public static java.lang.Object[] getChildEdges(mxIGraphModel model, java.lang.Object parent)
Returns the child edges of the given parent.- Parameters:
model
- Model that contains the hierarchical information.parent
- Cell whose child edges should be returned.- Returns:
- Returns the child edges of the given parent.
-
getChildCells
public static java.lang.Object[] getChildCells(mxIGraphModel model, java.lang.Object parent, boolean vertices, boolean edges)
Returns the children of the given cell that are vertices and/or edges depending on the arguments. If both arguments are false then all children are returned regardless of their type.- Parameters:
model
- Model that contains the hierarchical information.parent
- Cell whose child vertices or edges should be returned.vertices
- Boolean indicating if child vertices should be returned.edges
- Boolean indicating if child edges should be returned.- Returns:
- Returns the child vertices and/or edges of the given parent.
-
getParents
public static java.lang.Object[] getParents(mxIGraphModel model, java.lang.Object[] cells)
-
filterCells
public static java.lang.Object[] filterCells(java.lang.Object[] cells, mxGraphModel.Filter filter)
-
getDescendants
public static java.util.Collection<java.lang.Object> getDescendants(mxIGraphModel model, java.lang.Object parent)
Returns a all descendants of the given cell and the cell itself as a collection.
-
filterDescendants
public static java.util.Collection<java.lang.Object> filterDescendants(mxIGraphModel model, mxGraphModel.Filter filter)
Creates a collection of cells using the visitor pattern.
-
filterDescendants
public static java.util.Collection<java.lang.Object> filterDescendants(mxIGraphModel model, mxGraphModel.Filter filter, java.lang.Object parent)
Creates a collection of cells using the visitor pattern.
-
getTopmostCells
public static java.lang.Object[] getTopmostCells(mxIGraphModel model, java.lang.Object[] cells)
Function: getTopmostCells Returns the topmost cells of the hierarchy in an array that contains no desceandants for eachthat it contains. Duplicates should be removed in the cells array to improve performance. Parameters: cells - Array of whose topmost ancestors should be returned.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-


Owen
Home
Education
Experience
Interest
Owen
Contact Me
Leave Me a Message
Choose a Date
First Name:
Last Name:
Email:
Comments:
Enter Comments Here
textarea>


Gamify Pricing
Don't be cheap.
Invalid App Id. Please replace
YOUR_APP_ID
in
js/config.js
with your own App Id.
How to find your App Id...
Invalid token. Please replace
YOUR_TOKEN
in
js/config.js
with a token with permissions set to
plan.search
.
How to create an API token...
This price list doesn't have any plans.
Click here to create a new plan.


This is my webpack PWA boilerplate.
It uses workbox-webpack-plugin to generate the serviceworker and webpack-dev-server for development purposes.
Find me on GitHub


Editor + Insert Image with file uploading
- The LocalImagePluginplugin is an 'example' style plugin that shows how to insert
image tags.
- You need a php server to test this plugin. Please enable dojox\form\tests\cLOG.php and
dojox\form\tests\UploadFile.php first.
Editor + Insert Image without file uploading
- The LocalImagePlugin is an 'example' style plugin that shows how to insert
image tags.


{% load static %} {% load index %}
DCCW: Application 1. Palette Interpolator
{{ message }}
{% endfor %}Or
Input Palette
Sorted Result: DCCW-based
Sorted Result: HSV-based
Sorted Result: Luminance-based
Polygon-shaped interpolation: DCCW
Polygon-shaped interpolation: HSV
Polygon-shaped interpolation: Luminance
Half-disk-shaped interpolation: DCCW
Half-disk-shaped interpolation: HSV
Half-disk-shaped interpolation: Luminance