Overlapping listeners in layers, help
Hi,
I have one more question.
I am using a JLayeredPane, and in there i have multiple panels in different layers.
Each panel has it's own mouse motion listener, and the parent panel containing layered pane also has mouse listeners.
depending on which panel is on top, i want different things to happen.
I noticed that when the parent panel has its mouse motion listener working, the listeners of the panel who is at the topmost layer don't work.
how do you control multiple listeners of overlapping layers?
The top layer (parent's glass pane?) will always grab the click. Java makes a good guess, like using a Button if it's added to a Panel but if your needs are more complex, you should take over and not depend on a layering scheme.
Set some sort of flag when you change panels. Then have your code call an appropriate listener based on the flag:
final static int
THIS_PANEL = 1,
THAT_PANEL = 2,
int activePanel = 0;
// after setting thisPanel
activePanel = THIS_PANEL;
// in main mouse listener
// MouseEvent is "me"
switch activePanel {
case THIS_PANEL:
thisListener( me );
break;
case THAT_PANEL:
thatListener( me );
break;
default: // whatever
} // end switch
Similar Messages
-
Dragging Channels To Layers Help Needed
Hi Folks,
I've been working with the tutorial link below to get rid of some stains, While I have no problem working directly on the channels, I'm lost as to what it means to drag the channels onto layers. I can't seem to find a reference as to how to do this. Most likely I don't have to correct term when I'm searching.
Any help or point to a reference would be a big help.
"I normally drag the channels out onto layers to make the repairs. This gives much more control, especially if graduated masks are required. On this occasion and for the sake of simplicity I've made the repairs directly on the channels."
Tutorial Link
http://retouchpro.com/tutorials/?m=show&id=304
Thanks,
ChuckI think what he useallydoes is to drag the channel to the new channel icon in the bottom of the Channels palette. This creates a duplicate of the channel draged was a new alpha channel with the name Channel xxx copy. Then they would select that channel and work on it. When done they may replace the original channel with the worked on contents of the copy or blend it in some way.
-
Photoshop cs5 avi import frames to layers HELP!!
on my 2009 macbook i have photoshop cs5 which allows me to make gifs by importing frames to layers on avi files only. now i have put cs5 onto my new macbook pro which does not allow mp4 or anything else, but when you select the avi files no video comes up it is just blank and on some files you can hear a distorted sound from the video if you click the play button. does anyone know why this is? is it to do with quicktime on the new macbook pro not supporting avi? why does everything always change this is so frustrating, what is the point of this laptop if i cant even do the basic stuff i was doing on my old (but slow) macbook? $2000 just to use the internet is not worth it, thinking of returning if i cant fix it. any help would be great!
You might have more responses in this forum:
https://forums.adobe.com/community/photoshop/photoshop_macintosh -
Pop-Up Menu getting hidden behind Layers - HELP!
I'm designing with layers instead of tables for the first
time. I've just begun inserting vertical Pop-Up Menus as usual as
part of my navigation buttons and when I checked it in the browser,
I saw that the menu is getting hidden behind the separate layer
below the layer that I have my navigation buttons in.
Can anyone tell me how to fix this? Is there a way to set the
properties to make one layer more prominent than other layers or
something along those lines? Why would it be doing this in the
first place?
Thanks in advance!!You are on the wrong road here. Check this -
http://apptools.com/examples/pagelayout101.php
Here's why you don't want to use layers as a general layout
tool -
http://www.great-web-sights.com/g_layer-overlap.asp
And here's why you don't want to use DW's pop-up menus -
http://www.losingfight.com/blog/2006/08/11/the-sordid-tale-of-mm_menufw_menujs/
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"breathingunderwater" <[email protected]>
wrote in message
news:f54tl1$qgo$[email protected]..
> I'm designing with layers instead of tables for the
first time. I've just
> begun
> inserting vertical Pop-Up Menus as usual as part of my
navigation buttons
> and
> when I checked it in the browser, I saw that the menu is
getting hidden
> behind
> the separate layer below the layer that I have my
navigation buttons in.
>
> Can anyone tell me how to fix this? Is there a way to
set the properties
> to
> make one layer more prominent than other layers or
something along those
> lines?
> Why would it be doing this in the first place?
>
> Thanks in advance!!
> -
Resizing all layers - HELP!
I got a PSD file from a friend for a web page. I'm looking at it in Photoshop PS4 and at the 85% view, it looks like it will make a nice web page, but at the 100% view, it's huge. The PSD must have about 70-80 layers in it. Is there a way to reduce everything to the 85% view size, so that it can be sliced at that size?
Thanks in advance for any help!You can use Image->Image Size for that
-
Transparent Layers, help please !!
Hello everyone,
I'm having the following problem that i really need to solve. I have a graph and over the graph I need to display transparent layers that contain some images.. the thing is that I don't know what to use.. i've tried jpanel with setOpaque(true) on, jlayeredPane and nothing nothing is working... can anyone please help me? thanx a lot.
take care
ilandFirst of all, opaque is the opposite of transparent. So calling setOpaque(true) on any well-behaving component is the best way to guarantee it will not be transparant.
You can get some nice transparancy effects with AlphaComposite. E.g.,
//in the class that draws your graph
public void paintComponent(Graphics g) {
//paint graph
Graphics2D g2 = (Graphics2D) g.create();
g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.25f);
//draw transparent images
g2.dispose();
}The float in setComposite determines the alpha value (i.e., the opacity) of anything that get's drawn after setComposite is invoked. -
Hey everyone,
I'm in the process of updating my portfolio site using Flash Catlyst and am having some layering issues.
Under the 'Graphic' tab, I have the first two buttons set up how I want, but as you will see, the layering causes the buttons to appear in front of the image in the Toggle Button when selected. Not what I'm looking for. The first image is how I want it to appear when the image is enlarged, the secnd is the issue with the button showing in front of the image due to layering.
I've tried to combine the buttons as a custom/generic component, but the same problem still occurs.
Anyone have any suggestions or fixes for this?
Thanks!Thanks for forwarding me the file. I found the issue. In the original design, you combined the thumbnail and the large version of the image into a single toggle button. This means that all of its elements existed in one layer. The result is the large image that you want to appear as an overlay can never be higher in the visual layering than the component. Hence the issue you were seeing.
You need to separate the thumbnail elements from the overlays in order for the layering to function properly. To work around the 20 page limit in Catalyst, I turned all the overlays into a custom component. The first page is blank, so it can be on the screen and have no affect on the thumbnail buttons.
I uploaded a demo of a solution for you.
Chris -
CS4 importing video frames to layers help ; no preview only white blank frames
everytime i import video frames to layers ,, i cant see any preview , theirs no images in the farmes,, all i can see is white blank frames
You simply chose a file which is encoded with an unsuitable CoDec. Export/ Convert the file in an external tool first.
Mylenium -
Photoshop CS3 crashes a lot when moving layers - Help.
Using:
MAC OS 10.5.4
Photoshop 10.0.1
MacBook Pro, 2.5 GHz Intel Core 2 Duo, 4 GB 668 MHz DDR2 SDRAM
My crashes are very specific. When I move a layer around in the layers palette, Photoshop will crash. It doesn't always crash when moving layers, but it does happen a lot!
Anyone have the same problem? Any solutions?
Thanks so much.
JohnHow much space do you have on your scratch disk?
-
PS CS3 - import video frames into layers help
I'm trying to import an avi file into PS CS3 using the 'import video frames into layers' tool, and I had 3ivx trial but it expired and now it leaves a watermark on all the layers. Anyone know of a free alternative?
Not really. That's just how DivX Pro works.
Mylenium -
Help with Query - Duration Calculation/Time Overlap
Hello All,
Here is the scenario.
We have a table of events which has event id, start datetime and end datetime. This is essentially a calendar of a person.
EventID StartTS EndTS
21 8 AM 4 PM
20 9 AM 11 AM
18 3 PM 4 PM
2 10 AM 12 AM
The result I need is event id, duration where the duration is the duration of the event minus the overlap duration of any other event with event id less than the current event id.
Answer :
EventID StartTS EndTS Duration Overlap
21 8 AM 4 PM 8 - 4 = 4 All below 3 event
20 9 AM 11 AM 2 - 1 = 1 EventID #2
18 3 PM 5 PM 2 No Overlap
2 10 AM 12 PM 2 No Overlap
Thanks for you help!scott@ORA92> CREATE TABLE events
2 (EventID NUMBER,
3 StartTS DATE,
4 EndTS DATE)
5 /
Table created.
scott@ORA92> INSERT INTO events VALUES (21, TO_DATE ( '8 AM', 'HHAM'), TO_DATE ( '4 PM', 'HHPM'));
1 row created.
scott@ORA92> INSERT INTO events VALUES (20, TO_DATE ( '9 AM', 'HHAM'), TO_DATE ('11 AM', 'HHPM'));
1 row created.
scott@ORA92> INSERT INTO events VALUES (18, TO_DATE ( '3 PM', 'HHAM'), TO_DATE (' 5 PM', 'HHPM'));
1 row created.
scott@ORA92> INSERT INTO events VALUES ( 2, TO_DATE ('10 AM', 'HHAM'), TO_DATE ('12 PM', 'HHPM'));
1 row created.
scott@ORA92> COMMIT
2 /
Commit complete.
scott@ORA92> ALTER SESSION SET NLS_DATE_FORMAT = 'fmHH AM'
2 /
Session altered.
scott@ORA92> SELECT * FROM events
2 /
EVENTID START ENDTS
21 8 AM 4 PM
20 9 AM 11 AM
18 3 PM 5 PM
2 10 AM 12 PM
scott@ORA92> SET SERVEROUTPUT ON FORMAT WRAPPED
scott@ORA92> DECLARE
2 v_overlap NUMBER;
3 v_ts DATE;
4 BEGIN
5 DBMS_OUTPUT.PUT_LINE ('EventID StartTS EndTS Duration Overlap Duration-Overlap');
6 FOR rec1 IN
7 (SELECT eventid, startts, endts,
8 (endts - startts) * 24 AS duration
9 FROM events)
10 LOOP
11 v_overlap := 0;
12 v_ts := rec1.startts;
13 FOR rec2 IN
14 (SELECT *
15 FROM events
16 WHERE eventid < rec1.eventid
17 AND startts < rec1.endts
18 AND endts > rec1.startts
19 ORDER BY startts)
20 LOOP
21 v_ts := GREATEST (v_ts, rec2.startts);
22 IF rec2.endts > v_ts
23 THEN
24 v_overlap := v_overlap + ((LEAST (rec2.endts, rec1.endts) - v_ts) * 24);
25 v_ts := LEAST (rec2.endts, rec1.endts);
26 END IF;
27 END LOOP;
28 DBMS_OUTPUT.PUT_LINE
29 (LPAD (rec1.eventid, 7)
30 || ' '
31 || LPAD (rec1.startts, 7)
32 || ' '
33 || LPAD (rec1.endts, 7)
34 || ' '
35 || LPAD (rec1.duration, 8)
36 || ' '
37 || LPAD (v_overlap, 7)
38 || ' '
39 || LPAD ((rec1.duration - v_overlap), 16));
40 END LOOP;
41 END;
42 /
EventID StartTS EndTS Duration Overlap Duration-Overlap
21 8 AM 4 PM 8 4 4
20 9 AM 11 AM 2 1 1
18 3 PM 5 PM 2 0 2
2 10 AM 12 PM 2 0 2
PL/SQL procedure successfully completed. -
Help With Various Dreamweaver Issues
Dear Friends,
This is my first post and I appreciate any help any of you
can give me. My knowledge of web design is minimal, but I do have a
basic understanding. The fundamentals of HTML and web design as a
whole are pretty clear. My weakness, however, shows in the fine
detailed issues that come up throughout the course of designing a
website, and much of it may have to do with a lack of knowledge
with the software I'm using. I love Dreamweaver CS3. It's an
excellent program. I'm totally hooked!
I'm in the process of building a website for a friend who
owns a retail gift store. The site has a total of 41 pages. The URL
is
http://www.southerncharmgifts.net
It has taken me over a month to get this site to the place
where it is now. I've learned a TON about web design, CSS, and the
Dreamweaver program itself. I've been able to work through many of
the issues I've had, but I'm stuck on a few things:
1.
Browser Issues.
I've found it hard to sync the content between browsers:
namely IE and Firefox.
For example:
In IE the sub-menus wrap (as I want them to), but in Firefox
they do not. But in Firefox the sub-menu
box borders are visible (vertical menus), even though the
text doesn't wrap, but it's obviously in the dimensions that are
seen in IE.
In Firefox, the sub-menus are too far from the parent. It
looks bad. But they are perfect in IE.
The background image is centered in IE between the menus and
adverts, but not in Firefox. How do I get the background image to
remain between the menus and adverts? (Note: There is no background
on the home page. Also, wider screens seem to move the background
in IE, too.)
In the horizontal menu "Category" the sub-menu item "Babies"
cannot be selected in Firefox. In IE it works.
There are gaps between items in the horizontal sub-menu. It
appears to be related to items not wrapping, but it doesn't seem
that enlarging the sub-menu box causes the item to not wrap. For
example, under "Category" "Candles & Fragrances" is wrapped and
it seems to be the reason why there is a large gap between "Babies"
and "Eyewear." If I can find a way to get Candles & Fragrances
to NOT wrap it might remove the gap.
2. CSS Issue.
I can't find a way to have the sub-menu hover
underline instead of highlight the items. I want it to
underline.
3. "False" Issue.
In the
vertical sub-menu "by CATEGORY" the word "false" shows up
just below the word "Babies." (It's hard to see, but it's there.)
THANKS!!> In the limited research and reading I've done in the
last few
> years I've never heard anyone say this about APdivs.
Your limited research has failed to uncover the essence of
proper technique
in creating web pages. Layers are NOT a general layout tool
and will cause
you much more grief than you ever imagined. Here's one big
reason -
http://www.great-web-sights.com/g_layer-overlap.asp
> divs/layers are an excellent tool in Dreamweaver
They are, but only for specialty applications.
> "Is this true or is this
> bregent's personal opinion?"
It is my personal opinion based on seeing hundreds (if not
thousands) of new
users throw themselves on their swords as a result of having
committed to
pages built with layers, on this very forum.
> Starting over from
> scratch isn't an option and the owner of the website
likes my work.
Starting over from scratch need not involve a redesign of the
graphics. But
on a site built from layers, it would certainly involve a
rethinking of the
layout method. Read this -
http://apptools.com/examples/pagelayout101.php
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Mark 8:36" <[email protected]> wrote in
message
news:[email protected]...
>
quote:
Originally posted by:
bregent
> >I'm in the process of building a website for a
friend who owns a retail
> >gift
> store.
> >The site has a total of 41 pages. The URL is
> >
http://www.southerncharmgifts.net
>
> It is unfortunate that you started working on a
production site without
> first
> having a grasp of the techniques and tools required. You
wouldn't start
> building cabinets until you had a basic knowledge and
experience with wood
> and
> woodworking tools, or you'd end up with a large pile of
sawdust. And
> unfortunately that's where you are heading with this
site. You've made the
> basic mistake of laying out the site using AP divs. AP
Divs should be used
> rarely if ever, and only for special purposed. They are
not a primary
> layout
> tool. Honestly, I would start over from scratch. But
first, spend the next
> few
> weeks or months learning proper layout techniques and
working through
> tutorials
> before actually starting on a production site. Good
luck.
>
> Ok, forgive me for doubting what you said here, but this
is the first I've
> heard of this. In the limited research and reading I've
done in the last
> few
> years I've never heard anyone say this about APdivs.
Because I think
> divs/layers are an excellent tool in Dreamweaver. And
with the exception
> of my
> background image problem, which probably can be fixed by
changing the
> perameters, the only problems with the website are the
menus. Everything
> else
> looks good on both IE and Firefox.
>
> So my question for the rest of the forum is: "Is this
true or is this
> bregent's personal opinion?" No offense meant bregent,
but equating a
> months+
> worth of extremely hard work to sawdust is rather
disturbing. I just want
> to
> make sure what you're saying is the general consensus
before I take this
> too
> seriously.
>
> Thanks for your input, though. I appreciate your
honesty. Starting over
> from
> scratch isn't an option and the owner of the website
likes my work. But
> I'll
> keep these things in mind for the future. Take care.
>
> -
Overlapping Objects-separate out shapes?
Is there a way to separate overlapping objects into separate shapes and still maintain the overlapping result? Meaning two objects that overlap with a "mode" and slight "transparency" added to the overlapping (in front) object that results in a tone of sorts, as the intersecting shape? I hope I was somewhat clear as to what I am trying to achieve.
An example is this logo that does something similar to what I'm trying to do. After layering all these objects over each other with different modes/transparency's separate each color as a shape but keep the overlapped color.
Any help is appreciated! Thanks!
~ErickOf-course... divide. I need another brain tonic. LOL!
The only thing I noticed is although it divides, it keeps the transparency mode for each shape created. Too bad there wasn't an option to eliminate the transparency and recolor instead of having to manually recolor. I know it sounds lazy but it sounds like a logical option to include. -
Reports overlaping in excel format in 11g
i have two reports in the compound lay out view, when i export into excel format those reports are overlapping can any one help on this
Hi,
Please refer this link..
OBIEE 11G OVERLAPPING REPORT in EXCEL
Please mark if it helps...
Thanks. -
Images getting overlapped?
Hi all,
I have one small problem.In my company there is PO form.At the end of the PO,I have to attach my code.I am getting one small problem,which I and my freinds are unable to resolve it for the past 10 days.I commented my entire code and checked with the below example.Even though I am getting the same wrong data.So,problem is not with my code.
At the end of the PO below is the code.I have one global variable 'X' declared in top include.
****End of existing PO code*********
****Begin of my code*******
X = '1'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'POSPEC'
WINDOW = 'MAIN'
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10.
X = '2'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'POSPEC'
WINDOW = 'MAIN'
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10.
POPEC is text element in main window.It creates a new page POSPEC
/E POSPEC
NEW-PAGE POSPEC
I have one variable window,which has the variable 'W'.Now I have to get 2 new pages(POSPEC) with W as '1' on the begining page and W as '2' on second page.But unfortunately I am getting W as '2' on the two pages.Remember W is on the variable window of the page 'POSPEC'.
Like the same way,Bitmap images are getting overlapped.
Can anyone help me in this regard.It is very very urgent.I have been struggling a lot.
I know the solution that if we print in main window then there wont be any issues.Could you please let me know other alternate solution other than Main Window.My problem is I have to remove main window and create another window,which is bigger than main window.This we need because our Bitmap images will be too bigger.So I created new page with new variable window.Main window is part of PO .I modified both Print program and PO form to include my Modifications immediate after PO starting with new page.
So I can't create a new page with Main window.Since parameters for Main window are fixed and they are not allowing bitmaps to be fit.
Finally I want more space on the page to print my bitmap images,which are bigger than main window dimensions.
Please let me know if you have any questions.
Thanks,
BalajiVery big question whatever i have understood
-For big bitmap image first try to reduce the size and then uplaod
-insert this image in a variable window similar to footer
Not clear because as per your msg
I have one variable window,which has the variable 'W'.Now I have to get 2 new pages.
but in coding the POSPEC text element is being called in main window.
Try to include X in any other variable window for printing.
anya
Maybe you are looking for
-
Mini DVI to S-video display problem
I connect my macbook to a plasma TV using mini DVI to S-video adapter so I can give keynote presentations. All of a sudden, having not changed any settings, the plasma display went to black & white while my macbook's display remains in color. I have
-
Item having 0 price is going through credit check
Hi, We are facing following issue- Our sales order is having multiple line items including a line item which creates network. When we enter the line items with price in sales order, the sales order goes into credit check. Then we review & release the
-
Error while saving as draft the outgoing payment
Hi All, My client is getting an error message "This entry already exists in payment draft OPDF (ODBC)" while saving as draft the outgoing payment. Please advice any solution. Regards, Siddiq
-
i have a hp dv6 laptop.. it would not play any discs or burn them.. i replaced it with a TSST corp CDDVDW TS-L633M 0200.... so now i can play movies, cd's, ect.. but it will not burn cds... i ran a check on it.. and it said theres a write error.. the
-
Exception in setting up message-driven bean container: [MQJMS1010: not impl
Problem ======= We are trying to configure and deploy a Message Driven Bean to listen on a WebSphere MQ queue, using LDAP to share knowledge of the Queue & Connection Factory. But when we start the Sun One domain we get an exception: javax.jms.JMSExc