Getting Started with the NetBeans Platform. Extending NetBeans Possibilities > single module > suite of modules > standalone application > like a suite.

Slides:



Advertisements
Similar presentations
Introduction to Java 2 Programming
Advertisements

Introduction to Java 2 Programming Lecture 3 Writing Java Applications, Java Development Tools.
A Toolbox for Blackboard Tim Roberts
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
 Copyright 2005 Digital Enterprise Research Institute. All rights reserved. The Web Services Modeling Toolkit Mick Kerrigan.
Using JavaServer Pages Harry R. Erwin, PhD CIT304/CSE301.
My First Building Block Presented By Tracy Engwirda 28 September, 2005.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Java Tutorial – Building GUIs Java with Added Swing Daniel Bryant
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
Views Dwight Deugo Nesa Matic
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Eclipse IDE. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as teaching.
03 Using Eclipse. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as.
1 Lecture 18 George Koutsogiannakis/Spring 2011 CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES.
Programming Task: Task 1 Controlled Assessment Practice.
Creating of Rich Client Applications using NetBeans 6 and Java Swing Miroslav Nachev.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 9: Customize! Navigating with a Master/Detail.
Google Maps Android API v2 吳俊興 國立高雄大學 資訊工程學系 CSF645 – Mobile Computing 行動計算
Java Programming, 3e Concepts and Techniques Chapter 2 - Part 2 Creating a Java Application and Applet.
The NetBeans IDE CSIS 3701: Advanced Object Oriented Programming.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
Using Eclipse. What is Eclipse? The Eclipse Platform is an open source IDE (Integrated Development Environment), created by IBM for developing Java programs.
Copyright © Curt Hill Java Looking at our first console application in Eclipse.
Jaeki Song ISQS6337 JAVA Lecture 03 Introduction to Java -The First Java Application-
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
Binding UI Components to Data. Adding UI Components to the Page You can create components on a page by: Dragging a component from the Component Palette.
V. Serbo, SLAC ACAT03, 1-5 December 2003 Interactive GUI for Geant4 by Victor Serbo, SLAC.
1 Object-Oriented Programming (Java), Unit 23 Kirk Scott.
 2003 Joel C. Adams. All Rights Reserved. Calvin CollegeDept of Computer Science(1/15) MVC and Swing Joel Adams and Jeremy Frens Calvin College.
1 CSE1340 Class 4. 2 Objectives Write a simple computer program in Java Use Swing components to build the GUI Use proper naming conventions for classes.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Building the CarryDrop simulation in Eclipse Creating a new project with existing code from John Murphy’s RePast tutorial.
© 2009 by IBM; made available under the EPL v1.0 | Feb 1, 2009 Seneca 2009 Tim deBoer Gorkem Ercan Extend WTP Server Tools.
Lesson 28: More on the GUI button, frame and actions.
Cosc 5/4735 YouTube API. YouTube The YouTube Android Player API enables you to incorporate video playback functionality into your Android applications.
Netbeans QuickStart. Creating a project File->New Project –For now you want General->Java Application –Then fill in the project details.
DCI BRIDGE Introduction its Native Access Hands-On Akos Balasko
Guide To Develop Mobile Apps With Titanium. Agenda Overview Installation of Platform SDKs Pros of Appcelerator Titanium Cons of Appcelerator Titanium.
Maven & NetBeans Platform. Agenda ● Maven NetBeans Platform Project Types ● Three NetBeans RCP project types ● Differences with Ant project types ● All.
Using NetBeans IDE for Desktop Development Geertjan Wielenga
NetBeans Platform intro Emilian Bold. What's it about ? ● Contains usual desktop application items: – Window management – Menu & tool bar management –
Window System API. Agenda ● 1. Terminology ● 2. TopComponent ● 3. WindowManager ● 4. Mode ● 5. TopComponentGroup ● 6. Configuration Options ● 7. Case.
Porting a Swing Application to the NetBeans Platform Anton Epple
NetBeans Rich Client Platform Alex Kotchnev Software Developer Commerce Technologies Inc. Alex Kotchnev Software Developer Commerce Technologies Inc.
An Introduction to the Window System. Agenda ● Problem statement ● Solution ● Demos: ● Creating a TopComponent ● Porting a Swing Application ● API Overview.
System FileSystem Everything is a Stream. What is it? General registry of configuration data.
Eclipse.
ATS Application Programming: Java Programming
TE004 Smart Change Management with Sage CRM Component Manager
Eclipse Navigation & Usage.
Activities and Intents
Geertjan Wielenga This presentation introduces Swing Application Framework and Beans Binding JSRs. These are two new JSRs.
Productivity Tools Extensions to NetBeans IDE that make life easier
Quick Start Guide for Visual Studio 2010
Evolve What is a Component?
Constructors, GUI’s(Using Swing) and ActionListner
Installing and running the local check and grader projects in Eclipse
Java Tutorial – Application Building
Using Eclipse.
Developing Java Applications with NetBeans
Java Looking at our first console application in Eclipse
Developing Java Applications with NetBeans
Working with Libraries
JAVA APPLET PREPARED BY Mr. Jahanzaib Ahmed
Java Code Review with CheckStyle
Plug-In Architecture Pattern
Presentation transcript:

Getting Started with the NetBeans Platform

Extending NetBeans Possibilities > single module > suite of modules > standalone application > like a suite of modules > wrapper module of an existing JAR

Extending NetBeans Possibilities > single module > suite of modules > standalone application > like a suite of modules > wrapper module of an existing JAR

Single module creation

Suite & standalone application Suite > set of modules that have to be loaded together Standalone application > same as the suite > configured to be run as standalone application

Dependencies

Branding application

Executing application Run > executes new instance of IDE with installed modules Install /Reload in Development IDE > runs module in the development instance of IDE > no new instance is executed > available for standalone modules only

Distribution Modules ~ NBM files > common JAR file > with extra info in its manifest Standalone apps > ZIP files or > JNLP application

Converting an existing applications

Generic process “Library” without UI => library wrapper Application with UI > converting the application by parts > Swing panel => TopComponent > Actions => CallableSystemAction, CallbackSystemAction > Menu => NB menu via layer >...

Converting application Levels of conformance > Level 0: Launchable > enhancing the manifest file with NetBeans entries > adding dependencies to other modules > adding menu item to “launch” the application > Level 1: Integration > using NetBeans Window system and Dialog API > initialization via ModuleInstal or META-INF/services > Level 2: Use case support > follow NetBeans paradigms > Level 3: Aligned > reusing as much as possible, cooperating with other modules

Example Converting the Anagram Game > available as a std example > New Project → Samples → Java → Anagram game Step 1 – create new module

Step 1

Getting Level 0 Copy classes of the anagram game to our module Add new action Implement the action to show the anagram game window

Copying game classes

Adding an action

Implementing action package cz.cuni.mff.nb.anagram; import com.toy.anagrams.ui.Anagrams; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public final class AnagramGameShowAction implements ActionListener { public void actionPerformed(ActionEvent e) { new Anagrams().setVisible(true); }

Finished Execute new IDE with out module > “Run” in the right-click menu Pack module as NBM file Distribute the module ;-)

Converting an existing applications Obtaining Level 1

Converting to Level 1 Using TopComponent and Dialog API > JFrame → TopComponent

Process Create new TopComponent > “Window component” Copy Anagram panel to the created window Copy local variables

Creating new TopComponent Choosing position > in which are the component has to appear

Creating new TopComponent Name prefix for created classes etc.

Creating new TopComponent

Copying panel to the window Select JPanel in the Anagram class Copy it Paste it to the TopComponent class Ctrl+C Ctrl+V

Copying variable Copy a variable from the Anagrams class Paste it to the TopComponent Ctrl+C Ctrl+V

Window System

Overview Window system > management of windows (panels) in the NetBeans Basic Elements > TopComponent > JPanel with additional methods > Mode > in which are the component has to be placed  i.e. docking mode > WindowManager > managing state of UI > TopComponentGroup > set of windows that should be activated together

TopComponent open() close() requestVisible() requestActive() componentHidden() componentShowing() componentDeactivated() componentActivated() componentClosed() componentOpened()

TopComponent Persisting session across sessions > TopComponent implements Externalizable > default persistence code public int getPersistenceType() { return TopComponent.PERSISTENCE_ALWAYS; } /** replaces this in object stream */ public Object writeReplace() { return new ResolvableHelper(); } protected String preferredID() { return PREFERRED_ID; } final static class ResolvableHelper implements Serializable { public Object readResolve() { return XTopComponent.getDefault(); }

TopComponent Changing persistence > change ResolvableHelper > and writeReplace() Persistence modes > PERSISTENCE_ALWAYS > PERSISTENCE_NEVER > PERSISTENCE_OPENED

Mode Position in application Many predefined > editor, navigator, output,.... Own one can be defined > defined by XML > no editor available > “little hack” for creation > launch IDE with module > move the component to the desired area > exit IDE > copy automatically created mode description

Mode

Mode Opening a component in a particular mode programmatically public void open() { Mode mode = WindowManager.getDefault(). findMode(“mode”); if (mode != null) { mode.dockInto(this); } super.open(); }

TopComponent groups Set of windows that should be activated together Defined by file descriptors > wsgrp > wstcgrp

TopComponent groups