GWT- Need Disclosure Container to open horizontally - java

I have been looking all day for a simple way to modify the disclosure container to open horizontally rather than vertically, to no avail. I am a beginner Java/ GWT programmer btw.
I have figured out GWT does not directly have a current solution. Additionally, the GWT HorizontalSplitPanel will not suffice. I need a button that the user clicks to close a left side panel of links. When the button is pressed again, it will expand the tab to show the links again.
IOW: i need something similar to what google uses here:
https://groups.google.com/forum/?fromgroups#!overview
(when you click the expand arrow on the left hand side of the page)
I need to make this into a container in GWT, available to put widgets inside and outside of it. Any advice for this? Do I really need to create a Java animation and everything from scratch?

I need this functionality too. Did you come up with a solution? I was thinking we could extend SplitLayoutPanel and add in the button/widget to expand/collapse.

Related

live Java GUI Builder like FireBug extension for HTML and CSS

I have been a Web Developer for more than 5 years and is now diving into Java as well. I have used NetBeans and its Drag & Drop feature. But due to habbit I like to code everything manually not by NetBean's Drag and Drop.
Everything is perfect but when it comes to put different components on different locations on a JPanel, it becomes really pain to know what co-ordinates for x and y to put components at.
When it's website developing in HTML and CSS, we have many tools like FireFox's FireBug extension etc which help us in adjusting CSS live.
Is there anything for Java as well so we can adjust our component live and then when we know x and y, we can make actual code in Java.
For example, I create a button and put in a jframe, when I run it, I can adjust it's location and then change my actual code.
I don't know it's either possible or not. But as there are Gurus so asking if they would be knowing of some tool.
Don't try to manually set x / y / size of components. Use layout managers and call pack() on your JFrame to size and place your components. Due to differences in screen size and resolution it is very difficult to have your GUI look nice on all systems using manual sizing and placement. Have a try with layout managers and come back with a specific question if you can't get the specific visual look you want.

How create a custom breadcrumb control in java using SWT?

I have to develop a simple breadcrumb control using SWT which shows hierarchy of the system folders opened so far in a bar at the top and all the folders present at the current location in a window below. Folders should be hyper linked so one can click to move into them further. From where should I start?
As for the visual part, you can use the Breadcrumb widget from the Opal project.
It looks like this:
To handle selection, just add a SelectionListener to each of the BreadcrumbItems.
Note that this is not a "hire a programmer" page, so don't expect complete solutions to your problem. If you have specific questions, we are more than happy to try to answer them :)

How Do I Rotate A Widget In NetBeans Visual Library?

I am building a document layout editor in NetBeans Visual Library API, and I am looking for a way to let the user rotate a widget about it's center with the mouse. How would I go about adding this functionality?
UPDATE
I think I need to clarify, this is what I want to accomplish:
User clicks on a Widget in my NetBeans Visual Library API based document layout editor
User drags the mouse. As the user drags the mouse the Widget rotates about it's center
User release the mouse button. The Widget remains in the rotated position.
I am not using an NetBeans Platform or an IDE.
Looking at the API doc for Widget, I don't see how it is possible.
There is another approach I can suggest.
extend Widget (the relevant widget you are interested in), add support for rotation. In paintWidget method, add a line
graphicsContext.rotate(angle)
The angle will have to come from your model or user interaction. How you build the user interaction is another exercise, but this approach should work.
If you need something which is already provided, then simply copy the source in your own class and add support for rotation.
If you have already come across a better way, I would be happy to learn about it.

JavaFX Drag and Drop with Interacting Objects

I am attemping to implement drag and drop that is not just an image being dragged around the screen but has interaction between dragged and droppedon object.
in short what I'm trying to achive is:
When i drag one 'source' object and drop it on a 'target' object the 'target' object recieves information about the'source' that was dropped on it
This ( http://rakeshmenonp.wordpress.com/2009/07/20/javafx-drag-and-drop/ ) sample application describes its actions as what I'm looking for however the app doesnt work for me. I was able to build the source (it requires a few modifications, as the yahoo shopping URL no longer works) and with a few alterations get the shopping items to show up. However there is no drag/drop functionality.
Does anyone have any other samples that they could point me toward?
All of my javafx searches for drag and drop come back with apps that just deal with moving an object on the screen, or they use 'canvas' which is no longer supported
thanks, stephanie
There is no standard Drag and Drop support in JavaFX 1.3.1 in the way you want to use it. There was an alpha preview being worked on, but it did not make it into the release. As JavaFX is being totally rewritten it is hard to say what support for DnD will be in the new release.
Check this out I found this after relentless search. the below is a drag and drop example in javafx
http://0divides0.wordpress.com/2010/10/21/image-drag-and-drop/

How do I make controls autosizing in Qt designer?

I'm using Qt Jambi 4.4 for a project I'm working on (and designing the windows in the Qt Designer eclipse plugin). One of the windows I'd like to use is a preview window which is basically just a window with a QWebView on it. How can I make it so that the QWebView resizes as the window does? I've set the sizePolicy to expanding for both Horizontal and Vertical position. What else do I need to do?
(also bear in mind that I'm a newbie to both Java and eclipse and need to be talked to in stupid people terms on both of those subjects)
UPDATE
Just to illustrate the point, here are a couple of screenshots (I've made the window background bright just to illustrate my point):
alt text http://img13.imageshack.us/img13/2103/screenshot2oi7.jpg
alt text http://img152.imageshack.us/img152/6250/screenshot1mz9.jpg
I don't know Jambi, but with Qt Designer just give the background the focus and then apply a layout from the toolbar. Then the main widget will get resized by that layout manager -- if you don't add that layout manager you'll get the widget resizing but the contents staying at their old positions.
I haven't used qt-jambi, but if it is anything like Qt in C++ or PyQt, the QWebView would resize automatically as the window size changes. As far as I know, setting size policies/ expansion factors, adding QSpacerItem objects etc. is only necessary if the sizing behavior is not working right. Just laying it out using an appropriate layout within the preview window should be sufficient. Do let me know if I have misunderstood the question.
You need to place the QWebView in a layout, that it will follow the change in its "container". For using layout with Qt Designer, refer to http://doc.trolltech.com/4.5/designer-layouts.html
From Qt Designer docs:
The form's top level layout can be set by clearing the selection
(click the left mouse button on the form itself) and applying a
layout. A top level layout is necessary to ensure that your widgets
will re-size correctly when its window is re-sized.

Categories