Overlapping components problem

Hello,
I have been developing an applet for Quickplaces. Basically it shows what is happening in the Quickplace from different kind of views. A view from a document where people can see who has been viewing it for example. Or a view from a member where one can see what documents the member wrote.
Now I have chosen to implement a sort of circle visualisation for this. In the center is the object the view is about, a document, a member, etc. Outwards are other objects. In the case of a document view, the members that responded to it, in a circle more outward: members that viewed it. Etc. It's sort of a dartboard.
I have written a custom layoutmanager for each view for this. A problem I have encountered is that once I tell a member or document component to let itself be placed by the layout managerr I get a fixed size component. It looks ok until you for example hover over it, wich I have keyed to a zooming in on details method. When you do that your usually overlapping other components. Why, components can be overlapped without zooming in some views. The problem is the mouselistener I have attached fires when I hover over de component size. Not the size of the actual graphical representation. My members for example are represented by a sphere. They are bounded by a rectangle component though. So if I enter my mouse anywhere near the sphere... it already zooms in, resulting in the user zooming in on a member, but actually he wanted to zoom in on a member that was close to this one, but for the code was "underneath" the component of the other member.
It's a bit hard to explain without posting a screenshot.
How do I fix this?

Hi,
I need a clarification, taking the example you
provided:
you have a rectangle components, that display spheres.I have a viewer class for document's member's and room's. RoomViewer, MemberViewer, etc. These paint the actual graphic. They are given a size by the custom layoutmanager i wrote like this:
        //Layout members
        int mems = members.size();
        if(mems != 0){
            double angle = 360 / mems;
            double baseAngle = 0;
            synchronized(members){
                 Iterator iter = members.iterator();
                 while(iter.hasNext()){
                     MemberViewer tempMember = (MemberViewer)iter.next();
                     Dimension d = tempMember.getSize();
                     double lastLog = tempMember.getMember().getLastLog() * 160 + Math.sqrt((Math.pow(50, (double)2) + Math.pow(50, (double)2)));
                     int xCoord = (int)((xCenter + (Math.cos(Math.toRadians(baseAngle)) * lastLog)) - (0.5 * d.getWidth()));
                     int yCoord = (int)((yCenter + (Math.sin(Math.toRadians(baseAngle)) * lastLog)) - (0.5 * d.getHeight()));
                     tempMember.setBounds(xCoord, yCoord, container_size, container_size);
                     baseAngle += angle;
        }A viewer get's it's data from the model class. MemberViewer from Member, etc.
First you want to zoom only when the mouse is hovered
on the sphere. Is that right ?Yes I have implemented the enters part of the mouselistener. As soon as the mouse enters the component in wich the graphical representation is drawn it zooms. with zoom I multiply the size by some and add some different graphs inside the circle, but that is not important. What is interesting is probably that the size of the component when it is not zoomed is the size for when it is zoomed in, or the zoom in would be cut off by the component boundaries.
What about the overlapping ? could you clarify a bit
please.
Basically it overlaps nicely on the view. Once you interact though I get stuck. Clicking, entering and exiting is supposed to do things. But all these 3 fire when your mouse does that thing inside the component, not inside the graphical representation. So you start zooming quite a bit away from the circle of a member btw, because that distance is already part of the component, but not of the drawing.
Who is reponsible for drawing the shapes ?The Viewers paint themselves. The Layoutmanager gives them a basic place to start their own painting and a View class controls the layoutmanager.
And who listens to mouse motion ?The viewers themselves do. They implement mouseListener.
in mouseMoved(MouseEvent e)
you can get the point with e.getPoint(); where the
mouse points to.
This will help you to handle the event only when
hovered on the shape,
but it will maybe not solve the hovering over
overlapped components.I don't quite follow that. A Shape can still not implement MouseListener.

Similar Messages

  • Dispatching Events on overlapping Components

    Hello,
    i use a layered pane that contains some custom components. How can I make that two overlapping components that reside in the same layer both receive a mouseEvent?
    At the moment, only the Componet above receives the event - I know I can pass an Event with dispatchEvent - but i don't know the instance of the component to which to pass it of course... Is there any method to dispatch the event without having to know to which component to pass it?
    Any help appreciated.
    Best regards & Thanks.
    alex

    You can use use EventQueue.postEvent to post the event, but it requires source and if it is mouse event it will be later retargeted to correct components according to coordinates. So the only way for you to do this is to find the components by yourself and call processMouseEvent on it.

  • Redraw problem when overlapping components

    As part of a project to automatically generate a GUI for a legacy application I found a problem that occures when I have to overlap JComponents (have to - because the basic layout is given by the legacy application). The following code demonstrates the problem:
    import java.awt.*;
    import javax.swing.*;
    public class Overlap
        public static void main(String args[]) {
            JFrame frame=new JFrame("test");
            JTextField text1=new JTextField("text1");
            JTextField text2=new JTextField("text2");
            JLabel label=new JLabel("LabelTest");
            label.setOpaque(true);
            Container content=frame.getContentPane();
            content.setLayout(new GridBagLayout());
            GridBagConstraints c=new GridBagConstraints();
            c.gridx=c.gridy=1;
            c.gridwidth=2;
            c.fill=GridBagConstraints.BOTH;
            content.add(label, c);
            c=new GridBagConstraints();
            c.gridx=c.gridy=c.gridwidth=1;
            c.fill=GridBagConstraints.BOTH;
            content.add(text1, c);
            c=new GridBagConstraints();
            c.gridx=2;
            c.gridy=c.gridwidth=1;
            c.fill=GridBagConstraints.BOTH;
            content.add(text2, c);
            frame.setVisible(true);
            frame.pack();
    }This gives a JFrame with a JLabel over two JTextField's - the JTextField's shoud be invisible. Actually you have a blinking cursor, the text of both JTextField's is selectable with the mouse, you are able to switch the focus between the JTextField's with the mouse ...
    Is there a way to force correct Z-order handling in this case?
    Tested with linux JDK 1.4, with 1.3 and 1.2 the initial drawing is done correctly but you are still able to select the JTextField's with the mouse.

    try to explain what you whant to doMh - as I said - it is a cooked down version of the problem. Imagine a 80x25 GridBagLayout (the base of this problem is a form based text mode application) with up to about 500 separate widgets in it. The problem now is that it is possible that some of these widgets overlap some others. So it is possible to place a label like widget over something that behaves like a textfield.
    Z order of a component is best made by using
    JLayeredPane objects can be added to the same layer
    but there will be problems if they overlapIn the case of JLayeredPane I think need to optimize the usage of them - when I take one for each widget then I'm sure I'm running out of the design specifications. But then I've to detect overlapping by myself.
    All this is a bit strange because there already is a Z-order defined when adding all this to one single JPanel - is the actual behaviour a swing bug or am I running out of the specified limits even there?

  • Logical components problem when checking project

    Hello,
    I have searched in the forum for a solution, but the people who had the same kind of problem managed to solve it with means that do not work for me.
    Here is the situation :
    - We have a three tier landscape, DEV-QAS-PRD, in transport domain DOMAIN_A, with domain controller DCA
    - We have our Solution Manager system, DCB, which is part of (and domain controller of) transport domain DOMAIN_B
    - The two transport domains are linked, as specified in SolMan prerequisites for managing systems from other transport domains. This has been tested, and transports can be forwarded and imported freely from one domain to another.
    - I have created the systems, RFC destinations, and logical component for the three tier landscape in SolMan system DCB. The RFCs are all OK.
    - I have created the domain controller DCA system in SolMan DCB, with RFC destination to client 0, as defined in the prerequisite for Change Request Management.
    - Finally, I have created a project in SolMan system DCB, with this logical component.
    When I try to do a Check on this project, in the Change Request management tab, I have green lights everywhere, except for the following :
    - In "Check logical components" : No consolidation system found for DEV-040 (our development system)
    - In "Check consistency of project" : Message from function module /TMWFLOW/CHECK_PRJ_CONS: No export system for PRD-020 (our production system)
    We have checked the TMS settings and transport routes, and everything looks OK.
    Any ideas on what to check/try would be welcome.
    Thanks,
    Thomas

    Hi,
    Check the status of the DC's in the track created in CBS.
    at following location.
    http://url:port/webdynpro/dispatcher/sap.com/tc.CBS.WebUI/WebUI
    There should be no Broken DC's in the track.
    If every thing is fine here and you still have problems then check by repairing the class path of the component.
    Hope this helps you.
    Regards,
    Nagaraju Donikena
    Regards,
    Nagaraju Donikena

  • Sub components problem in custom tag

    Hi!
    Im writing custom tag that do nothing but can contains other components.
    So first I create custom tag with hendler that extends UIComponentTag and component class that extends UIComponentBase
    now tag work but i dont see sub components on the page
    Second i override encodeChildren and getFamily methods with:
    public String getFamily() {       
            return "MyCaller";
    public void encodeChildren(FacesContext context) throws IOException {
            Iterator ch=this.getChildren().iterator();
            while(ch.hasNext()){
                 UIComponent oKid = (UIComponent)ch.next();
                 if(oKid.isRendered()){
                    oKid.encodeBegin(context);
                    oKid.encodeChildren(context);
                    oKid.encodeEnd(context);
            super.encodeChildren(context);
        }But subcomponents not rendered on page.
    So are you know whats wrong

    the problem was in wrong getComponentType() that return wrong value

  • Using a layout to allow overlapping components

    I want to implement some kind of swing component, as of right now I'm using a JLabel and painting an image on it, to create tiles of a game board.
    The problem is the tiles aren't square and I don't know how to allow the JLabels or JButtons or whatever component is easiest, to overlap in the places i need them to.
    Here is an image of the type of tiles I want to use.
    http://home.insightbb.com/~twilightimp/current_map.jpg
    Does anyone have any ideas?
    thanks

    Swing questions should be posted in the Swing forum. Here's an article that shows you how to create round buttons in Swing, maybe it will help.
    http://java.sun.com/developer/TechTips/txtarchive/1999/Aug99_PatrickC.txt

  • UIPickerView and didSelectRow with multiple components problem

    If I spin two components at the same time in my picker I only get one call to didSelectRow....
    More specifically, if I spin one component and move another component no call is recieved until the first component stops spinning, and so the second component move is missed.
    I use this to update displayed data so it looks badly wrong. Is this yet another bug with the SDK?

    Hi,
    I have the same problem. Actually it is not so annoying in my application as it is only cosmetic. However my application was rejected by Apple because of this issue.
    I checked what would happen in the built-in alarm app if the hour and minute picker wheels are rolled at the same time... and both value are recorded. So there must be a programmatic solution to this problem and it is definitely not a bug of the SDK.
    It would be great if someone knows how to solve this.

  • ColdFusion Builder Admin Server Components Problem

    After downloading the admin server components, extracting them into their appropriate directories, and executing the adminstart.bat file, I'm receiving the following error:
    This application has failed to start because MSVCR71.dll was not found.  Re-installing the application may fix this problem.
    I did a search for that file and found several instances throughout the coldfusion8 directory.
    I am running Coldfusion Standard                  8,0,1,195765 on Windows 2003.
    Thoughts?

    I have started it using the adminstart.bat file.
    Starting Macromedia JRun 4.0 (Build 108673), admin server
    07/14 08:52:39 warning Unable to open C:\ColdFusion8\runtime/lib/license.properties
    07/14 08:52:40 info JRun Naming Service listening on *:2910
    07/14 08:52:40 info No JDBC data sources have been configured for this server (see jrun-resources.xml)
    07/14 08:52:40 info JRun Web Server listening on *:8000
    07/14 08:52:40 info Deploying enterprise application "JRun 4.0 Internal J2EE Components" from: file:/C:/ColdFusion8/runtime/lib/jrun-comp.ear
    07/14 08:52:40 info Deploying EJB "JRunSQLInvoker" from: file:/C:/ColdFusion8/runtime/lib/jrun-comp.ear
    Server admin ready (startup time: 3 seconds)
    Think the problem has to do with the second line...shouldn't that be "security.properties"?

  • Components problem

    Hi.
    I have problem. When I import the file using simple code, the components not working.
    This is how I import swf file to my project:
    function otworz_napisz(event:MouseEvent):void {
    var myLoader:Loader = new Loader();
    var urlRequest:URLRequest= new URLRequest("form.swf");
    trace("ok");
    myLoader.x = 106.3;
    myLoader.y = 84.9;
    addChild(myLoader);
    myLoader.load(urlRequest);
    and result is when you click the last button "@" at the project: http://www.krzyskania.nazwa.pl/autoskup2/.
    Please help me.

    The file that is linked is good. You can see this hear: krzyskania.nazwa.pl/autoskup2/form/form.swf.
    File with the link has following code:
    package AS{
    import flash.display.*;
    import flash.events.*;
    import flash.net.*;
    public class Autoskup extends MovieClip {
    public function Autoskup():void {
    //dodaje chmurki:
    // 1)
    samochod.addEventListener(MouseEvent.MOUSE_OVER,wyswietl_chmurke);
    function wyswietl_chmurke(event:MouseEvent):void {
    var chmurka_o_nas:Onas=new Onas;
    chmurka_o_nas.x=-1;
    chmurka_o_nas.y=245;
    addChildAt(chmurka_o_nas, 1);
    samochod.addEventListener(MouseEvent.MOUSE_OUT,usun_chmurke_onas);
    function usun_chmurke_onas(event:Event):void {
    chmurka_o_nas.visible = false;
    // 2)
    klucze.addEventListener(MouseEvent.MOUSE_OVER,wyswietl_chmurke_oferta);
    function wyswietl_chmurke_oferta(event:MouseEvent):void {
    var chmurka_oferta:Oferta=new Oferta;
    chmurka_oferta.x=-1;
    chmurka_oferta.y=328;
    addChildAt(chmurka_oferta, 1);
    klucze.addEventListener(MouseEvent.MOUSE_OUT,usun_chmurke_oferta);
    function usun_chmurke_oferta(event:Event):void {
    chmurka_oferta.visible = false;
    // 3)
    telefon.addEventListener(MouseEvent.MOUSE_OVER,wyswietl_chmurke_kontakt);
    function wyswietl_chmurke_kontakt(event:MouseEvent):void {
    var chmurka_kontakt:Kontakt=new Kontakt;
    chmurka_kontakt.x=-2;
    chmurka_kontakt.y=410;
    addChildAt(chmurka_kontakt, 1);
    telefon.addEventListener(MouseEvent.MOUSE_OUT,usun_chmurke_kontakt);
    function usun_chmurke_kontakt(event:Event):void {
    chmurka_kontakt.visible = false;
    //4
    napisz.addEventListener(MouseEvent.MOUSE_OVER,wyswietl_chmurke_napisz);
    function wyswietl_chmurke_napisz(event:MouseEvent):void {
    var chmurka_napisz:Napisz=new Napisz;
    chmurka_napisz.x=-2;
    chmurka_napisz.y=490;
    addChildAt(chmurka_napisz, 1);
    napisz.addEventListener(MouseEvent.MOUSE_OUT,usun_chmurke_napisz);
    function usun_chmurke_napisz(event:Event):void {
    chmurka_napisz.visible = false;
    //włącza okna:
    //obiekty nasłuchujące:
    samochod.addEventListener(MouseEvent.MOUSE_DOWN,otworz_onas);
    klucze.addEventListener(MouseEvent.MOUSE_DOWN,otworz_oferta);
    telefon.addEventListener(MouseEvent.MOUSE_DOWN,otworz_kontakt);
    napisz.addEventListener(MouseEvent.MOUSE_DOWN,otworz_napisz);
    //dodanie okienka O nas:
    function otworz_onas(event:MouseEvent):void {
    var nas:okienko_onas = new okienko_onas();
    nas.x = 96.3;
    nas.y = 734.9;
    addChild(nas);
    //dodanie okienka Oferta:
    function otworz_oferta(event:MouseEvent):void {
    var oferta:okienko_oferta= new okienko_oferta();
    oferta.x = 96.3;
    oferta.y = 734.9;
    addChild(oferta);
    //dodanie okienka Kontakt:
    function otworz_kontakt(event:MouseEvent):void {
    var kontakt:okienko_kontakt= new okienko_kontakt();
    kontakt.x = 96.3;
    kontakt.y = 734.9;
    addChild(kontakt);
    //dodanie okienka Napisz:
    function otworz_napisz(event:MouseEvent):void {
    var myLoader:Loader = new Loader();
    var urlRequest:URLRequest= new URLRequest("http://krzyskania.nazwa.pl/autoskup2/form/form.swf");
    trace("ok");
    myLoader.x = 106.3;
    myLoader.y = 84.9;
    myLoader.load(urlRequest);
    addChild(myLoader);
    myLoader.addEventListener(Event.COMPLETE, dodajdosceny);
    function dodajdosceny(evt:Event):void {
    trace("ok")
    //linkuj do mojej strony:
    WP.addEventListener(MouseEvent.MOUSE_DOWN,linkuj);
    function linkuj(event:MouseEvent):void {
    var url:String = "http://www.wloczykijproductions.pl";
    var request:URLRequest = new URLRequest(url);
    navigateToURL(request);
    Is required to import the linked file class? O, and I try also copy this file to library of main project, but happens the same.
    If you can, help me.

  • Help: An overlapping report problem

    I am working on a report. The records can be categorized into more than 1 types. If it is say to two types, A and B, with the set A and B are overlapping. I need to create a report that
    1. shows the records belong to A or B (can be done with repeating frames)
    2. some kind of subtotals for each category
    3. grand total
    If there is no overlapping, it is a simple repeating frame problem. How do I deal with this kind of the problem?
    Thank you in advance.
    Jimmy

    ensure both of yours HDD's are detected by OS.(check it from device manager(sysdm.cpl))
    type in "run" type there "diskmgmt.msc" and hit enter, check partition status from there, ensure each one has corespond assigned drive letter.
    about layout, click on view and choice prefered way.(etc: details). also made right click and select "arrange icons by", and tick "shown in groups" to restore style from 2nd picture.

  • ACS 4.1 Shared Services Components problem

    I'm not able to edit the Shared Profiles Components for CiscoWorks in ACS. Error:
    Failed to edit Ciscoworks Campus Manager.
    Reason: You have insufficient privilege to Add/Edit Ciscoworks Campus Manager.
    I logged in with admin account in ACS with all permissions. When opening the properties of my admin account, all the CiscoWorks rights are deselected. I can select all the rights, apply the changes, but the rights are not applied !

    Seems like it is a windows AD-problem. every 30 min the server gets an gpoupdate (depending on who is logged in to the server) and if i have unchecked the box "use proxyserver" (IE - Options - connections - Lan settings) this update changes everything back to default, ie checks that box back. So next step: talk to some windows-people.
    thanks anyway!
    /lina

  • AS2 strict type components problems

    Hi Flasher:
    I try to work with the macr. components using AS2 strict
    type, but allways i get a error message and the final swf
    dosen´t work. Any idea ?????
    This is the code & the error message
    Flash 8
    Mac OS 10.4.6
    Tks ;-D

    Hi Luigi!!
    And thks for your pretty class.
    But when I use the code without the _root in a G4 with Mac OS
    X 10.4.4 the swf works fine...
    Maybe there are some problems with the class import* ,
    because the movie dosen´t work with the same code
    >color_cb.addItem({data:0x000000, label:'Black'});
    on a Mac G5 with Mac OS X 10.4.6.
    Gracias por todo ;-D
    be Feraless

  • Overlapping components

    I'm trying to write a card game, and I want to layout some cards with some overlap in a container. I'd like to do this with a standard Layout Manager if possible, rather than hardcoding it, but I can't find one which will do this - can anyone suggest on and how I can use it?
    Thanks in advance,
    Stefan

    I'm trying to write a card game, and I want to layout
    some cards with some overlap in a container. I'd like
    to do this with a standard Layout Manager if possible,
    rather than hardcoding it, but I can't find one which
    will do this - can anyone suggest on and how I can use
    it?
    Thanks in advance,
    StefanThere are many things that you can do. One is to override the draw function to draw everything. This is the coolest option, because you can nice things like rotate the cards when dealing and stuff like that.
    Or an easier option is to use JLayeredPane, look at the tutorial, it has something very close to what you want!
    http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html

  • JDev10.1.2: Importing business components problem

    Hi guys, I hope someone could help me here:
    I have a business components project; from it I created a business components archive (deployment profile), and this profile generates two jar files. One jar file contains the business components and the other one just contains the application modules' interfaces.
    Then I imported the business components into another model project (in another workspace) from the jar files using File / Import / Business Components and selecting the package's xml file.
    Then I have a third View project which will have bindings to the last model project. The problem is that in the Data Control Palette the application modules appear with no interface methods (just Commit and Rollback).
    What should I do to make the View project's Data Control Palette aware of the application modules' interface methods so I can bind them to Data Actions?
    Thanks very much!

    repost

  • Layout that allows overlaping components

    I posted this in the general forum, I didn't know there was a swing forum:
    I want to implement some kind of swing component, as of right now I'm using a JPane; and painting an image on it, to create tiles of a game board.
    The problem is the tiles aren't square and I don't know how to allow the JPanels or JButtons or whatever component is easiest, to overlap in the places i need them to.
    Here is an image of the type of tiles I want to use.
    http://home.insightbb.com/~twilightimp/current_map.jpg
    Does anyone have any ideas?
    Do you think using a JLayeredPane to house all my tiles in would work, with the z-component increasing every row from the middle row?
    thanks
    Message was edited by:
    z0isch

    I got it working with JButtons and a JLayeredPane.
    =D

Maybe you are looking for

  • Using Gmail in the Cloud

    I've got an iMac, an iPhone and a emailadress like @gmail.com. Now I want to make use of iCloud. What do I have to do to make it alle syncing like it should do. I really want to use only @gmail.com. Maybe the question is better like this: Is there a

  • How to change the SID Oracle Database10g:Express Edition

    I will like to know the process to change the SID in the database Oracle 10: Express Edition. Thanks in advance

  • MCE3 : PO value/GR value/Invoice amount/invoice amount

    Once we excute the MCE3 transaction by giving selection parameters as Period from and to and Purchasing Org. When i see the report Vendor     PO Value            GR Value               Invoice amount             invoice amount       X          25761 

  • Movement Type 101 K

    Hello, I have a question regarding movement type 101 K. Currently we are trying to do vendor consignments and I have came across few documents stating to do a movement 101 K  when doing MIGO.  I do get an erro message stating that Movement type 101 k

  • Interactive PDF presentation

    Hello, I have a problem. I needo to do a presentation in full screen in pdf format. I want to put it on a CD. It needs to autorun upon inserting the CD and automaticaly open in FULLSCREEN !!! How do i make it to skip the popup window asking if a view