Loading...
those who doesn’t know about JETTY RUNNER:
JETTY RUNNER is a standalone swing based application which is used to bundle java ee based application along with jetty container. it comes with simple web app configuration xml file and global properties manager through a simple properties file.
actually i have been using this project for my own development solution, so i belief this project will become a great strengthen feature gradually.
JETTY RUNNER is now running on max OSX, i have removed system try support in new tag v-0.2, soon i will release *.dmg package for mac osx. here are few screen snaps -

figure - 1: server console main window

figure - 2: global properties editor
change logs -
1. removed system tray support
2. removed default jmx configuration
3. added “start.sh” to launch JETTY RUNNER on *nix based platform where ruby script is installed.
here are few screen snaps, which i have taken from the newly added ruby script! -

figure - 3: newly added jetty runner on ruby

figure - 4: newly added jetty runner implementation in ruby
this script really great
, at least i like it
Hi, here is code snap to make resizable your undecorated window
private void _setUpWindowResizeEvent() {
this.addMouseMotionListener(
new MouseMotionListener() {
public void mouseDragged(MouseEvent mouseEvent) {
if( mHozResizeEnabled || mVerResizeEnabled ) {
int x = mouseEvent.getX();
int y = mouseEvent.getY();
_resizeWindow( MouseInfo.getPointerInfo().getLocation() );
}
}
public void mouseMoved(MouseEvent mouseEvent) {
boolean horizontalResize = mouseEvent.getX() < = getWidth() && mouseEvent.getX() >= getWidth()-5;
boolean verticalResize = mouseEvent.getY() < = getHeight() && mouseEvent.getY() >= getHeight()-5;
if( horizontalResize ) {
setCursor( new Cursor( Cursor.W_RESIZE_CURSOR ) );
mHozResizeEnabled = true;
mWindowMouseClickPoint = mouseEvent.getPoint();
}
else if( verticalResize ) {
setCursor( new Cursor( Cursor.S_RESIZE_CURSOR ) );
mVerResizeEnabled = true;
mWindowMouseClickPoint = mouseEvent.getPoint();
}
else {
setCursor( new Cursor( Cursor.DEFAULT_CURSOR ) );
mHozResizeEnabled = false;
mVerResizeEnabled = false;
}
}
}
);
}
Just for reminder,
“How to drag undecorated window”
place a JLabel or what ever component which does support mouse mototion and mouse event listener.
undecorated window: when window is head less. no caption bar no resizable border. is enabled by setUndecorated( true );
private boolean mMoveStart = false;
private Point mMouseClickPoint = null;
private void _setUpMoveEvent() {
mWindowTitleLabel.addMouseMotionListener(
new MouseMotionListener() {
public void mouseDragged(MouseEvent mouseEvent) {
if (mMoveStart)
_moveWindowTo(mouseEvent.getPoint());
}
public void mouseMoved(MouseEvent mouseEvent) {
}
}
);
mWindowTitleLabel.addMouseListener(
new MouseAdapter() {
public void mousePressed(MouseEvent mouseEvent) {
mMouseClickPoint = mouseEvent.getPoint();
mMoveStart = true;
}
public void mouseReleased(MouseEvent mouseEvent) {
mMoveStart = false;
_fireStickyUpdated();
}
}
);
}
private void _moveWindowTo(Point point) {
int musDiffX = point.x - mMouseClickPoint.x;
int musDiffY = point.y - mMouseClickPoint.y;
setLocation( getLocation().x + musDiffX, getLocation().y + musDiffY );
sticky.setLocation( getLocation() );
}
here, mWindowTitleLable is JLable component
:D







| www.flickr.com |
Leave a reply