Different,
Strange,
Bizarre,
Unexpected,
yet lying there...
...on the ground
...in the corner
...sleeping soundly
...breathing softly
Turn around and it is done,
only the fleeting memory remains.
Step by step, towards the goal,
step by step - far away.
The pace is slow, but constant,
time passes by, disinterested.
Away and then further, and then some more.
Going and never stopping,
fleeing without even thinking.
A moment consumed with depth,
a revelation dulled by time,
then you know it,
you've know it all along!
The thing you left...
was your soul...
your being...
Thursday, August 11, 2011
Monday, August 8, 2011
A Runlet
Had we tears we could cry
Had we cried we could smile
Had we smiled we could live
Had we lived we could see
Had we seen we could act
Had we acted we could feel
Had we felt we could pray
Had we prayed we could love
Had we loved we could be
Had we cried we could smile
Had we smiled we could live
Had we lived we could see
Had we seen we could act
Had we acted we could feel
Had we felt we could pray
Had we prayed we could love
Had we loved we could be
Tuesday, August 2, 2011
How to handle MouseOut action in GWT with inner layers
Recently i had to face the following problem:
I had one panel which contained a picture with some other functionality. Additional two panels were to appear on top of that panel when the mouse was over the first panel and disappear when the mouse left it. Sound simple enough but the problem was that when one moved the mouse over the inner panels the MouseOut event was still triggered, which cause flickering of the panels and unwanted behaviour.
My solution:
I took all three panels and wrapped them up in one parent panel while setting their positions with CSS (if you use an AbsolutePanel you can also position them using the supplied methods like: 'setWidgetPosition(w, left, top)').
Once that I had the parent panel I did the standard 'sinkEvents(Event.MOUSEEVENTS);' in the constructor, in order to forward the needed events. Finally i added:
@Override
public void onBrowserEvent(Event event) {
switch (DOM.eventGetType(event)) {
case Event.ONMOUSEOVER: {
/* Show the two panels */
break;
}
case Event.ONMOUSEOUT: {
if(Element.is(event.getRelatedEventTarget())) {
/*
Get the related target, which is the element being entered, and
then cast the EventTarget to com.google.gwt.user.client.Element.
*/
Element el = event.getRelatedEventTarget().cast();
boolean toHide = true;
/*
Go through all the elements in the tree towards the root, in
order to be sure that 'el' is not a child of the current class.
If it is a child we should not hide the other two panels
*/
while(el != null) {
if(DOM.isOrHasChild(getElement(), el)) {
toHide = false;
break;
}
el = (Element) el.getParentElement();
}
if(toHide) {
/* Hide the two panels */
}
}
break;
} default: {
}
}
}
Note that the code is not complete, omitting the details from my implementation.
Links:
relatedTarget method
GWT Widget
Element
Event
NativeEvent
I had one panel which contained a picture with some other functionality. Additional two panels were to appear on top of that panel when the mouse was over the first panel and disappear when the mouse left it. Sound simple enough but the problem was that when one moved the mouse over the inner panels the MouseOut event was still triggered, which cause flickering of the panels and unwanted behaviour.
My solution:
I took all three panels and wrapped them up in one parent panel while setting their positions with CSS (if you use an AbsolutePanel you can also position them using the supplied methods like: 'setWidgetPosition(w, left, top)').
Once that I had the parent panel I did the standard 'sinkEvents(Event.MOUSEEVENTS);' in the constructor, in order to forward the needed events. Finally i added:
@Override
public void onBrowserEvent(Event event) {
switch (DOM.eventGetType(event)) {
case Event.ONMOUSEOVER: {
/* Show the two panels */
break;
}
case Event.ONMOUSEOUT: {
if(Element.is(event.getRelatedEventTarget())) {
/*
Get the related target, which is the element being entered, and
then cast the EventTarget to com.google.gwt.user.client.Element.
*/
Element el = event.getRelatedEventTarget().cast();
boolean toHide = true;
/*
Go through all the elements in the tree towards the root, in
order to be sure that 'el' is not a child of the current class.
If it is a child we should not hide the other two panels
*/
while(el != null) {
if(DOM.isOrHasChild(getElement(), el)) {
toHide = false;
break;
}
el = (Element) el.getParentElement();
}
if(toHide) {
/* Hide the two panels */
}
}
break;
} default: {
}
}
}
Note that the code is not complete, omitting the details from my implementation.
Links:
relatedTarget method
GWT Widget
Element
Event
NativeEvent
A forest picture
Footsteps
clear smell
a veil of raindrops
green forest
Cool air
soft breeze
blue sky
crystal eyes
A moment
rotating world
darkness
closed eyes
Warm smell
sweet touch
tender smile
soft arms
Unspoken words
Silent hug
Sunset
and a hue of red.
clear smell
a veil of raindrops
green forest
Cool air
soft breeze
blue sky
crystal eyes
A moment
rotating world
darkness
closed eyes
Warm smell
sweet touch
tender smile
soft arms
Unspoken words
Silent hug
Sunset
and a hue of red.
Who are we
Why is up down from the roof?
Why is here there from the bridge?
Why is nothing filled with sorrow?
Why is no yes in the morrow?
We see.
We eat.
We go.
We stay.
We cry.
We dance.
We pray.
Pray for love,
happiness,
life.
Pray for nothing and everything alike.
We are blind.
We are gluttonous.
We are lazy.
We are asleep.
We are hypocrites.
We are in a trance.
We are I.
We are many, yet we know us not.
We are together, yet we are alone.
Alone we are ... not,
for Someone is always watching,
caring
loving,
curing,
giving,
feeding,
forgiving.
We think we know, yet we fail to comprehend.
We think we are smart, yet what fools we are.
We think we are different, alas not true.
We think we are the same, indeed a lie.
To understand you have to forget who you are,
to live the life of the other -
to see with his eyes,
to smile with her smile,
to feel their hearts,
to remember our path.
We live, we love, we are happy!
For happiness is nought other than love
and what is love but happiness, indeed.
Why is here there from the bridge?
Why is nothing filled with sorrow?
Why is no yes in the morrow?
We see.
We eat.
We go.
We stay.
We cry.
We dance.
We pray.
Pray for love,
happiness,
life.
Pray for nothing and everything alike.
We are blind.
We are gluttonous.
We are lazy.
We are asleep.
We are hypocrites.
We are in a trance.
We are I.
We are many, yet we know us not.
We are together, yet we are alone.
Alone we are ... not,
for Someone is always watching,
caring
loving,
curing,
giving,
feeding,
forgiving.
We think we know, yet we fail to comprehend.
We think we are smart, yet what fools we are.
We think we are different, alas not true.
We think we are the same, indeed a lie.
To understand you have to forget who you are,
to live the life of the other -
to see with his eyes,
to smile with her smile,
to feel their hearts,
to remember our path.
We live, we love, we are happy!
For happiness is nought other than love
and what is love but happiness, indeed.
Subscribe to:
Posts (Atom)