Re: HOWTO handle right click on CellTable Header ?

2011-09-16 Thread redjhawk
Have you tried with event.preventDefault() ?

On Sep 16, 10:35 am, Christophe
christophe.march...@contactoffice.net wrote:
 Ok, that's work. I can display my popup menu. But it doesn't prevent
 default browser popup menu :http://xemelios.org/private/many-menus.png

 To stop propagation, I've tried this without any success :
         public void onBrowserEvent(Cell.Context context, final Element
 parent, SafeHtml value, final NativeEvent event,
 ValueUpdaterSafeHtml valueUpdater) {
             event.stopPropagation();
 ...

 Any idea ?

 Thanks in advance,
 Christophe

 On 15 sep, 17:23, Thomas Broyer t.bro...@gmail.com wrote:







  Where is this sinkEvents from?

  class SafeHtmlCellWithContextMenuT extends SafeHtmlCell {
    public SetString getConsumedEvents() { return
  Collections.singleton(contextmenu); }

    public void onBrowserEvent(Cell.Context context, Element parent, SafeHtml
  value, NativeEvent event, ValueUpdaterSafeHtml valueUpdater) {
      // here, event.getType() should be contextmenu
    }

  }

  Then use with: new Header(new SafeHtmlCellWithContextMenu());

  (best IMO would be to turn the above into a generic Cell that can wrap any
  other Cell, delegating everything to the wrapped cell, except for
  getConsumedEvents to add contextmenu to the list, and onBrowserEvent to
  handle the contextmenu)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Disable panel with a translucent dark mask

2011-08-29 Thread redjhawk
If you want to do it manually, you can add a layer (called B) over the
layer you want to hide (called A). Create also a CSS property similar
to:

.blackBackground
{
  background-color:black;
  filter: alpha(opacity=70);
  opacity:0.7;
}

Then, when the layer A should be hidden, add the property
blackBackground to the layer B

I use this and it works. I use all float panels so I can control the
exact position of each one but I'm sure it works with any kind of
panel.


On Aug 29, 1:40 pm, Ahmed ahmed.zar...@gmail.com wrote:
 I am programming the authentication system of the application I am
 working on. When the application loads for the first time, it asks the
 user for a username and a password. The login credentials are entered
 by the user using a form inside a gwt Window. This window is shown
 over the application interface (with its own layout).

 Then, I want to mask the underlying application interface so that the
 user can barely see the gui, but is not allowed to use any of its
 widgets. The effect I want to create is to put an dark translucent
 layer between the login window and the main application gui. In
 conclusion: I want to attain the same effect as the one shown when an
 alert MessageBox is displayed.

 Is it possible to do that? Thank you in advance.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: scrolling in iPad

2011-08-07 Thread redjhawk
To let a user do scrolling, you have to use a scrollpanel with any
widget with a size bigger than the parent scrollpanel.

I use a 'personalized' ScrollPanel with touch support
(TouchScrollPanel, at the end of this mail). That panel must fit the
mobile screen. Then, inside that panel, you have to insert any widget,
with the size desired. If that widget is bigger than the scrollPanel,
then you will be able to scroll.

GWT 2.3 already let the user to do vertical and horizontal scroll with
touch and mouse events. With GWT 2.2, you will have to do horizontal
scroll manually with touch events (detect onTouchStart,onTouchMove and
onTouchEnd):

void onTouchStart(TouchStartEvent event) {
startPoint =  event.getChangedTouches().get(0).getClientX();
startScroll=scrollPanel.getHorizontalScrollPosition();
}

void onTouchMove(TouchMoveEvent event) {
int change = (startPoint-
event.getChangedTouches().get(0).getClientX());
scrollPanel.setHorizontalScrollPosition(startScroll+change);
event.preventDefault();
}

void onTouchEnd(TouchEndEvent event) {
startPoint=0;
startScroll = 0;
  }


public class TouchableScrollPanel extends ScrollPanel implements
HasAllTouchHandlers {
@Override
public HandlerRegistration addTouchStartHandler(TouchStartHandler
handler) {
return addDomHandler(handler, TouchStartEvent.getType());
}
@Override
public HandlerRegistration addTouchMoveHandler(TouchMoveHandler
handler) {
return addDomHandler(handler, TouchMoveEvent.getType());
}
@Override
public HandlerRegistration addTouchEndHandler(TouchEndHandler
handler) {
return addDomHandler(handler, TouchEndEvent.getType());
}
@Override
public HandlerRegistration addTouchCancelHandler(TouchCancelHandler
handler) {
return addDomHandler(handler, TouchCancelEvent.getType());
}
}

On Aug 7, 1:17 am, macagain rgk...@gmail.com wrote:
 What's the best or right way to do gwt apps that scroll properly on the
 iPad?  I.e. apps that are bigger than the browser window.  Scrollpanel does
 seem to work either.

 I've tried some of the touch scroll panel widgets floating around, but they
 don't show the scroll bars, which of course confuses users.

 i've seen the gwt wiki on gwt/iphone, but that dates from 1.4 and the
 original iphone.  Anyone know of a better guide?

 Anyone done a gwt app for ipad?  would love to hear your experiences.

 -r

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Place an Image into the center of DockLayoutPanel ??

2011-07-18 Thread redjhawk
Did you set up properly the size of each part? I really haven't tested
it but it seems that if you don't put a size to the rest of elements,
the center will take all the space possible.
Reading the documentation:
http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/DockLayoutPanel.html#add%28com.google.gwt.user.client.ui.Widget%29,
it says, at the beginning: A panel that lays its child widgets out
docked at its outer edges, and allows its last widget to take up the
remaining space in its center.  And it is center the last element
to be added. (from the document: add
public void add(Widget widget)
Adds a widget at the center of the dock. No further widgets may be
added after this one. )




On Jul 18, 5:30 pm, JC johnacoo...@gmail.com wrote:
 I have a DockLayout Panel. I want to place an image into the center
 of: g:center. If I add the image to g:center or nest it within a
 SimplePanel, HTMLPanel, Grid etc - it always appears at the top left.
 How can I place the image in the center of the center panel ??

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Resizing parent element when child change size

2011-07-05 Thread redjhawk
Maybe you can implement a callback. Register simple panel in flow
panel and call the method when flow panel receives a resize event.


On Jul 5, 2:15 am, Milan Cvejic liquidbra...@gmail.com wrote:
 Hi Everyone,
 can anyone give me a hint how can I implement following situation:

 I have SimplePanel with child FlowPanel. What I want to do is to
 resize SimplePanel in order to fit
 FlowPanel when I add new widgets to the FlowPanel.

 Is best way to fire some event when i add new widget to FlowPanel and
 than catch that event in SimplePanel
 implementation?

 Or is there any native support for this?

 Thank you,
 Cheers

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Deploy in Tomcat

2011-06-17 Thread redjhawk
And the manifest generated?

On Jun 16, 11:55 am, Juan Pablo Gardella gardellajuanpa...@gmail.com
wrote:
 Can you paste the complete stacktrace?

 2011/6/15 IHateSoda mguillaum...@gmail.com







  Hi everybody,

  My application works in hosted mode.

  I'm trying to deploy my application in tomcat but I get one error when
  I want to restart my server :

  java.lang.NoClassDefFoundError: com/google/gwt/user/client/rpc/
  RemoteService.

  I copied my war folder in the webapp folder, I added all jar files in
  WEB-INF/lib (with gwt-servlet.jar), I declared all servlet and RPC
  service in the web.xml but I still the same error.

  Help please.

  Regards.

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-toolkit@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Displaying only part of an image using GWT Image Widget

2011-06-14 Thread redjhawk
Um, last parenthesis was not showed in the link... method is
setVisibleRect

On Jun 12, 9:49 pm, Jim Douglas jdou...@basis.com wrote:
 http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/g...)

 On Jun 12, 12:19 pm, Noor baken...@gmail.com wrote:







  I want to display only part of image using the GWT Image widget;
  for e.g. for an image of 400X400, I want to use an image widget to
  display only the top left 100x100 px. I want to do this for a puzzle,
  check thishttp://i.stack.imgur.com/4BVoi.png

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Need Scroll bars in ScrollPanel/cell table

2011-06-10 Thread redjhawk
Summarizing, it will be similar to:

scrollPanel.setWidth(Window.getClientWidth().+px);
grid.setWidth((widthOfEachCell*numOfCells+px);

in the scroll panel, you can set up whatever size you want. Here, I
put the width of the entire window.

You have to set up the grid: separation between cells, etc



On Jun 9, 3:14 pm, Darpan Kamboj kamboj.dar...@gmail.com wrote:
 I need to scroll bars to cell table but as I gone through some the
 posts this feature is not available currently.
 could anyone help me how to use ScrollPanel with cell table and how to
 set the dimentions of the panel to see  the scrool bar. As I want to
 show the 5000 rows in a cell table.

 Thanks
 Darpan

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Need Scroll bars in ScrollPanel/cell table

2011-06-10 Thread redjhawk
I forgot to tell you. Scroll bar will be only showed if the size of
the widget inside the scroll panel is bigger than the scroll panel.

Hope I explain it ok:)


On Jun 10, 9:28 am, redjhawk jorges...@gmail.com wrote:
 Summarizing, it will be similar to:

 scrollPanel.setWidth(Window.getClientWidth().+px);
 grid.setWidth((widthOfEachCell*numOfCells+px);

 in thescrollpanel, you can set up whatever size you want. Here, I
 put the width of the entire window.

 You have to set up the grid: separation between cells, etc

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: DockLayoutPanel with global Scroll

2011-03-22 Thread redjhawk


On Mar 22, 8:59 am, Marco Gadaleta gadaleta.ma...@gmail.com wrote:
 Hello everyone,
 i'm trying to use a docklayoutpanel inside a scrollpanel,
 but if i do this gwt gets angry with me...

Maybe you could insert a scrollpanel inside the docklayoutpanel, in
the center.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Clear Center of a DockLayoutPanel

2011-02-21 Thread redjhawk
I am new in the world of GWT and I haven't used UIBinder yet. But when
I use DockPanelLayout and center must be replaced, the solution I
found on the Internet is overloading DockLayoutPanel and rewriting the
add method.

Hope this is useful for you.

public class DockLayoutPanelReplaceable extends DockLayoutPanel {
@Override
public void add(Widget widget) {
if (getCenter() != null) {
   remove(getCenter());
}
super.add(widget);
}
}

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.