Mouse down event and Click event in List Box Very urgent.

Hi,
       How can i differentiate mouse down and itemclick in ListBox.Its very urgent.
Regards,
Jayagopal.

Nick wrote:
Turns out need update value while typing turned on if you want to gaurantee a correct read of a text input control in a mouse down event.
AFAIK, "Update value while typing" will trigger only a Value Change event of the Str Ctl.
Mouse Down event will preceed a Value Change event, if you have both the event cases configured in your code.
- Partha
LabVIEW - Wires that catch bugs!

Similar Messages

  • How to add selection event, change event and click event for dropdownlist for mobile applications

    Please someone help me in writng selection , click and change events for dropdownlist in flex for mobile applications . i have tried but i wasn't able to select the items in dropdown using my mouse or touch in my mobile . Please help me I am struck at this point and i am unable to get solution gfor this. Please................
    Some code for which i neederd help:
    <s:DropDownList id="ddlBranch" x="257" y="475" width="63%" height="80%"
                                    creationComplete="ddlBranch_creationCompleteHandler(event)"
                                    fontFamily="Calibri" fontSize="24"
                                    labelField="BranchName"
                                    prompt="{ddlBranch.selectedItem}"
                                    requireSelection="true"
                                    selectionColor="#7ab342">
                        <s:AsyncListView list="{getBranchResult.lastResult}"/>
                    </s:DropDownList>
    <s:DropDownList id="ddlZone" x="257" y="546" width="63%" height="80%"
                                    creationComplete="ddlZone_creationCompleteHandler(event)"
                                    fontFamily="Calibri" fontSize="24"
                                    labelField="ZoneName"
                                    prompt="{ddlZone.selectedItem}"
                                    requireSelection="true"
                                    selectionColor="#7ab342">
                        <s:AsyncListView list="{getZoneResult.lastResult}"/>
                    </s:DropDownList>
    I will get the list of Branches(first DDL) and Zones(Second DDL) from a webservice written in DOT(.)NET,  what i needded is touch events and selection events for both the dropdown lists and the data in the second DropDown List should bind based on the First Dropdown list item selected.
    Service call for binding data to DDL:
    protected function ddlBranch_creationCompleteHandler(event:FlexEvent):void
                    getBranchResult.token = loginService.getBranch();
                protected function ddlZone_creationCompleteHandler(event:FlexEvent):void
                    getZoneResult.token = loginService.getZone();
    Please help...
    Thank you.

    Therer are two ways you can assign an action to the "OnEnter"-event of your input field:
    1. in method cl_wd_input_field=>new_input_field you have the parameter:
    ON_ENTER
    You just have to assign your action name to this field and it will be called on the OnEnter-event of your InputField.
    e.g:
         lr_input_field = cl_wd_input_field=>new_input_field(
                                                 id = 'INP_MY_INPUT_FIELD'
                                                 on_enter = 'MYACTION'
    2. You can use the method SET_ON_ENTER.
    like:
         lr_input_field->set_on_enter( 'MYACTION' ).
    Just make sure, you have created and implemented this action and its handler.

  • I have itunes directory on an external hard drive and want to direct a new installation of itunes on windows 8 to use it. I tried holding down ctrl and clicking itunes and after many tries got it to work one time. When I went back in later it had reverted

    I have itunes directory on an external hard drive and want to direct a new installation of itunes on windows 8 to use it. I tried holding down ctrl and clicking itunes and after many tries got it to work one time. When I went back in later it had reverted back to a blank version of itunes and I cant get ctrl to work again. Any other ideas?

    This is sometimes caused by a problem with the iTunesPrefs.xml file, normally found at C:\Users\<User>\AppData\Local\Apple Computer\iTunes\iTunesPrefs.xml. Try dragging this to the desktop and trying again.
    Alternatively the problem may be that you have McAfee AV and it is preventing iTunes from updating the same file and thus causing the problem. See Why does iTunes delete my itunesprefs.xml? for details.
    tt2

  • What is the diffrence between sap events and application events

    Hi all,
    what is the diffrence between sap events and application events.Can any one tell me with examples.
    regards,

    Hi,
    Look at this,
    <b>System Events (Default)</b>
    The event is passed to the application server, but does not trigger the PAI. If you have registered an event handler method in your ABAP program for the event (using the SET HANDLER statement), this method is executed on the application server.
    Within the event handler method, you can use the static method SET_NEW_OK_CODE of the global class CL_GUI_CFW to set a function code and trigger the PAI event yourself. After the PAI has been processed, the PBO event of the next screen is triggered.
    The advantage of using this technique is that the event handler method is executed automatically and there are no conflicts with the automatic input checks associated with the screen. The disadvantage is that the contents of the screen fields are not transported to the program, which means that obsolete values could appear on the next screen. You can work around this by using the SET_NEW_OK_CODE method to trigger field transport and the PAI event after the event handler has finished.
    <b>Application Events</b>
    The event is passed to the application server, and triggers the PAI. The function code that you pass contains an internal identifier. You do not have to evaluate this in your ABAP program. Instead, if you want to handle the event, you must include a method call in a PAI dialog module for the static method DISPATCH of the global class CL_GUI_CFW. If you have defined an event handler method in your ABAP program for the event (using the SET HANDLER statement), the DISPATCH method calls it. After the event handler has been processed, control returns to the PAI event after the DISPATCH statement and PAI processing continues.
    The advantage of this is that you can specify yourself the point at which the event is handled, and the contents of the screen fields are transported to the application server beforehand. The disadvantage is that this kind of event handling can lead to conflicts with the automatic input checks on the screen, causing events to be lost.
    Hope u understood.
    Thanks&Regards,
    Ruthra.R

  • Multiple all-day events and one event disappears.

    I have multiple all-day events (in different calendars) and now sometimes (not always) one event won't show in iCal. It's still there cause it's now "....." instead of the name of the event.
    The old multiple all-day events show perfect but when I try to add another multiple all-day event now, it will only show one all-day event. It will show as maybe timed event as I wish but only one all-day event.
    I don't get why this has happened cause I have not changed anything from before except for maybe timezone.
    Any ideas?
    Thank you

    It seems that iCal only displays 5 all-day events, even if you have plenty of room in the calendar window. Change them to timed events and you can see more. Very annoying. I'd like to find a way to change that.

  • Difference between wait event and timed event

    Hi,
    Anyone has idea that what is the difference between wait events and timed events in Statspack report. I couldn't find it over google.
    Thanks.

    It's 10.2.0.1 on Linux
    (Couldn't do a query, because Linux is inside VM Ware. And it is not being accessed from Base windows machine.)
    Top 5 Timed Events                                                    Avg %Total
    ~~~~~~~~~~~~~~~~~~ wait Call
    Event Waits Time (s) (ms) Time
    db file scattered read 9,750,617 34,611 4 44.7
    CPU time 14,248 18.4
    read by other session 1,532,282 8,984 6 11.6
    db file sequential read 4,514,494 5,588 1 7.2
    latch: cache buffers lru chain 277,245 4,823 17 6.2
    Wait Events  DB/Inst: ABCD/ABCD  Snaps: 1-2
    -> s - second, cs - centisecond, ms - millisecond, us - microsecond
    -> %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
    -> Only events with Total Wait Time (s) >= .001 are shown
    -> ordered by Total Wait Time desc, Waits desc (idle events last)
    Avg
    %Time Total Wait wait Waits
    Event Waits -outs Time (s) (ms) /txn
    db file scattered read 9,750,617 0 34,611 4 24.2
    read by other session 1,532,282 0 8,984 6 3.8
    db file sequential read 4,514,494 0 5,588 1 11.2
    latch: cache buffers lru chain 277,245 0 4,823 17 0.7
    latch free 121,466 0 3,291 27 0.3
    ----------------------------------------------------------------------------------------------------

  • Can Touch Events and Swipe Events exist in the same frame and/or movie?

    After having fully tested a file with touch events I decided to add both a touch event and swipe event to a frame.
    I started by importing the following statements:
    Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
    Multitouch.inputMode = MultitouchInputMode.GESTURE;
    I then added th appropriate code but only touch events worked. I fiddled so more and only the gesture events worked. So before I move any further, I'm wondering if I'm wasting my time trying to get them to work together.
    So my questions are:
    Can Touch Events and Swipe Events exist together in the same frame?
    Can Touch Events and Swipe Events exist scene?
    A reference to more information about this would be helpful, if you know of any.

    I am aware of the latest releases of the components along with the plug-ins.
    This note is applicable to your scenario but you might face some issues related to organization rule wizard, custom user group creation and EAM DB log collection, as mentioned at the bottom of the note. No matter on what SP level you are with GRCFND_A at 10.1, you would face these issues.
    And so far, i don't think there is any more update from SAP on co-existence of plugins of 5.3 and 10.1
    Ameet

  • How to implement OnClick Event and OnMouseOver events in WDp

    Hi Frndz....
    Can any one share with me that is it possible to implement the actions like OnChange event and OnMouse Event in EP 7.0 NWDS 7.0.11
    Thnaks in Advance
    regards

    Hi
    Client events are supported in NW7.0.
    NW7.1 supports Client Events check the following threads that has few discussions
    [getting onchange event for inputfield]
    [Re: detecting tab event ?]
    Regards
    Raghu

  • Difference between busniess Event and object event

    Hi All,
    Can anyone explain to me what the difference between business event and object event in Beehive?
    thanks

    Business events are events that are exposed for integration with policies, audit, workflows, user notifications etc.
    Object events are an internal-to-beehive system service that are consumed within Beehive Services and are not exposed for application or user consumption.
    Richard

  • What are application events and system events? what is difference between ?

    what are application events and system events? what is difference between ?

    The Control Framework triggers the event irrespective of the screen flow logic, that is, without processing the PAI and PBO events. These events are called system events. This type of event processing is the default setting.
    ·The Control Framework processes the PAI module after an event. In this case, you must call method CL_GUI_CFW=>DISPATCHto initiate the event handling of ABAP Objects. These events are called application events.
    Application Event : you must first register the events for the control instance and consequently on the frontend.
    like..
    DATA events TYPE cntl_simple_events.
    DATA wa_events TYPE cntl_simple_event.
    1. Using field
    appl_event , define the event as an application event:
    wa_events-appl_event = 'X'.
    System events are passed on irrespective of the flow logic of the relevant screen.
    1. Change the value of field
    wa_events-appl_event in the PBO module:
    wa_events-appl_event = SPACE.
    Edited by: Devi Raju on Jul 1, 2008 1:48 PM

  • Drag and Drop between two list boxes

    Hi all
    I am working over Drag and Drop .. i have to implement Drag and Drop between two list boxes .. both list box exist in same page ..each list box have number of rows.. please give me some idea ... as i am new for JSP and Servlet...
    Thanks in advance
    Regards
    Vaibhav

    Hi all
    I am working over Drag and Drop .. i have to
    implement Drag and Drop between two list boxes ..
    both list box exist in same page ..each list box have
    number of rows.. please give me some idea ... as i am
    new for JSP and Servlet...
    Something close to what you are looking for is Select Mover in Coldtags suite:
    http://www.servletsuite.com/jsp.htm

  • Can anybody send me CRM tables and their relationship? It is very urgent.

    Can anybody send me CRM tables and their relationship? It is very urgent.
    and all the function modules availble in CRM.
    Jayalakshminarayana Kilaru

    Hello Vikas,
    Can you please send CRM tables to [email protected]
    thanks in advance

  • HasEventListener and click event problem

    Hi!
    Is it possible that hasEventListener() method has a bug? Whenever I remove event listener(using removeEventListener method) from a click event (which's been added using AS), hasEventListener always returns true. However event listener method gets removed. I've also tried some other events and I got mixed results, some have worked, some haven't.
    Thanks, regards

    Thanks for replying.
    I go to DO_HANDLE_EVENT as you said. There is already written something as below by wizard.
    class  : ZL_BT115QH__DETAILS_IMPL
    method: DO_HANDLE_EVENT
    code: 
    CASE htmlb_event_ex->event_server_name.
    *     Added by wizard
        WHEN 'PAYM'.                                            "#EC NOTEXT
          EH_ONPAYM( htmlb_event    = htmlb_event
                      htmlb_event_ex = htmlb_event_ex ).
    I added button in ZL_BT115QH__MAINWINDOW_IMPL but I try to handle in ZL_BT115QH__DETAILS_IMPL
    I thought this might cause the problem.
    Which DO_HANDLE_EVENT method you mentioned?
    method in  ZL_BT115QH__MAINWINDOW_IMPL or ZL_BT115QH__DETAILS_IMPL ??

  • Floating boxes applet with drag events need click event

    I Have an applet cobbled from the net & modified. Is works but needs one major event added. It draws "Graphics.drawline" boxes with a text "String" inside each box ( the text string represents an URL location). These "boxes" are objects which are "draggable to other locations on canvas & therefore can be independently positioned by user. Each box redraws itself periodically to a slightly different screen location & becomes stationary after a 5 or 6 seconds. The point is, all of this "drag & mobility" behavior must remain intact & is not part of the "problem task".
    Task: Need to have an "event" behavior added in one of two ways ( or a 3rd way if there is another ) whichever is quickest/ easiest. "Clickable mouse events" must be added to each box. ( boxes are built in a loop so adding to one will add to other locations & create as many "buttons" as there are boxes) . At each box's location, clicking one box should be an event which fires & clicking a different box should be a separate event which fires. Separate , so that URL location can be "hotlinked" to each box. That URL is currently displayed in the boxes (visible when running applet).
    1st possible solution: Exchange these "boxes" which appear on canvas into clickable event "Graph panel.buttons" ( for example or some other clickable object) which maintains existing "drag" behavior of boxes. These buttons must each have "clickability" with mouse events to enable placing "getAppletContext. showDocument()" code with these events ( e.g., "hotlinked" to http locations).
    or
    2nd possible solution:. The drawstring boxes are currently dead string text with no event model other than the "drag" feature associated with each box. Must add an additional mouse event behavior to existing boxes so they are "clickable" ( or text inside is clickable) and can then execute "showDocument()" URL when clicked independently.
    Maybe there is a #3. I don't know what that would be. Open to try anything without losing the drag & placement mobility of existing boxes.
    These "boxes" could be images, or event buttons - doesnt matter.
    Not sure if #2 is possible & have not been able to accomplish #1. Must stay within existing AWT framework so IE browsers can run it natively ( which of course IE cannot run Swing graphics unless a Sun plugin loaded ).
    Applet is a single file ( creating 4 classes).
    html file (which invokes it) passes a string param which is broken into above noted URL strings in each box.
    Running this applet, you see a "button" event ( at base of canvas labeled "NewUrl" ) which pops up an url location when clicked ( using "showdocument"). This button is not attached to locations or text of each box object ( which is the "task" to accomplish) . The button does represent the kind of event behavior which each "box" should have when task is achieved. So the box can be exchanged with buttons or the boxes can be imbued with events to hyperlink like a button.
    In spirit of solution #1, here is the bonehead attempt I tried which did not work: copied entire "if" block of logic from the button event (sited in preceding paragraph) into region of code which builds boxes ( "for" loop of "drawstring" method).
    "g.drawString(doit, x - (w-10)/2, (y - (h-4)/2) + fm.getAscent());"
    I copied all the "if" block of logic for button creation into the area immediately after the above line ( for loop which builds the boxes). Hoping that I could create buttons with events, along with all the boxes (which are getting created using "drawstring" above in a "for" loop). These "buttons" must also have positioning info of each box to appear in different locations on the canvas. Positioning data is not in that "if" block of code but it would have been a start to get the multiple buttons created ( even if all drawn in one spot). The "if" code block I've provieded for an example begins with the line:
    " if ("NewUrl".equals(arg)) { "
    and ends with with lines:
    " return true; "
    " } " //< -- end of above if block
    This full "if" block can be seen in the listing below:
    This "if" block creates the "NewUrl" button. Of course, I got a bunch of errors when I tried to copy this block to the above location:
    variable: "arg" "not found in class GraphPanel".
    methods: "getcodebase, showstatus, getappletcontext()"
    "not found in class GraphPanel".
    ----------- The applet code in total follows next
    Here are both the java & htm complete source.
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import java.applet.Applet;
    import java.applet.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.event.*;
    class Node {
    double x;
    double y;
    double dx;
    double dy;
    boolean fixed;
    String lbl;
    class Edge {
    int from;
    int to;
    double len;
    } // eEdgeCla
    class GraphPanel extends Panel implements Runnable {
    Box box;
    int nnodes;
    Node nodes[] = new Node[100];
    int nedges;
    Edge edges[] = new Edge[200];
    Thread relaxer;
    boolean showit;
    boolean random;
    GraphPanel(Box box) {
    this.box = box;
    } //ebox
    int findNode(String lbl) {
    for (int i = 0 ; i < nnodes ; i++) {
    if (nodes.lbl.equals(lbl)) {
    return i;
    return addNode(lbl);
    int addNode(String lbl) {
    Node n = new Node();
    n.x = 10 + 380*Math.random();
    n.y = 10 + 380*Math.random();
    n.lbl = lbl;
    nodes[nnodes] = n;
    return nnodes++;
    void addEdge(String from, String to, int len) {
    Edge e = new Edge();
    e.from = findNode(from);
    e.to = findNode(to);
    e.len = len;
    edges[nedges++] = e;
    public void run() {
    int i3=0;
    while (true) {
    relax();
    if (random && (Math.random() < 0.03)) {
    Node n = nodes[(int) (1 * nnodes) ]; // no
    if (!n.fixed) {
    n.x += (100*0.02) - 50;
    n.y += (100*0.02) - 50; //
    try {
    Thread.sleep(4000);
    } catch (InterruptedException e) {
    break;
    i3++;
    } //ew
    } // epublrun()
    synchronized void relax() {
    for (int i = 0 ; i < nedges ; i++) {
    Edge e = edges;
    double vx = nodes[e.to].x - nodes[e.from].x;
    double vy = nodes[e.to].y - nodes[e.from].y;
    double len = Math.sqrt(vx * vx + vy * vy);
    double f = (edges.len - len) / (len * 3) ;
    double dx = f * vx;
    double dy = f * vy;
    nodes[e.to].dx += dx;
    nodes[e.to].dy += dy;
    nodes[e.from].dx += -dx;
    nodes[e.from].dy += -dy;
    } //efo
    for (int i = 0 ; i < nnodes ; i++) {
    Node n1 = nodes;
    double dx = 0;
    double dy = 0;
    for (int j = 0 ; j < nnodes ; j++) {
    if (i == j) {
    continue;
    Node n2 = nodes[j];
    double vx = n1.x - n2.x;
    double vy = n1.y - n2.y;
    double len = vx * vx + vy * vy;
    if (len == 0) {
    dx += 0.02;
    dy += 0.02;
    } else if (len < 100*100) {
    dx += vx / len;
    dy += vy / len;
    } //ef3a
    double dlen = dx * dx + dy * dy;
    if (dlen > 0) {
    dlen = Math.sqrt(dlen) / 2;
    n1.dx += dx / dlen;
    n1.dy += dy / dlen;
    } //ef3
    Dimension d = size();
    // f4
    for (int i = 0 ; i < nnodes ; i++) {
    Node n = nodes;
    if (!n.fixed) {
    n.x += Math.max(-5, Math.min(5, n.dx));
    n.y += Math.max(-5, Math.min(5, n.dy));
    if (n.x < 0) {
    n.x = 0;
    } else if (n.x > d.width) {
    n.x = d.width;
    if (n.y < 0) {
    n.y = 0;
    } else if (n.y > d.height) {
    n.y = d.height;
    n.dx /= 2;
    n.dy /= 2;
    repaint();
    Node pick;
    boolean pickfixed;
    Image offscreen;
    Dimension offscreensize;
    Graphics offgraphics;
    final Color fixedColor = Color.green;
    final Color selectColor = Color.gray;
    final Color edgeColor = Color.black;
    final Color nodeColor = new Color(200, 90, 50);
    final Color showitColor = Color.gray;
    final Color arcColor1 = Color.black;
    final Color arcColor2 = Color.orange;
    final Color arcColor3 = Color.blue;
    public void paintNode( Graphics g, Node n, FontMetrics fm) {
    int x = (int)n.x;
    int y = (int)n.y;
    g.setColor((n == pick) ? selectColor : (n.fixed ? fixedColor : nodeColor));
    int w = fm.stringWidth(n.lbl) + 10;
    int h = fm.getHeight() + 4;
    g.fillRect(x - w/2, y - h / 2, w, h);
    g.setColor(Color.black);
    g.drawRect(x - w/2, y - h / 2, w-1, h-1);
    String doit = n.lbl.replace('x','/');
    g.drawString(doit, x - (w-10)/2, (y - (h-4)/2) + fm.getAscent());
    } // epa
    public synchronized void update(Graphics g) {
    Dimension d = size();
    if ((offscreen == null) || (d.width != offscreensize.width) || (d.height != offscreensize.height)) {
    offscreen = createImage(d.width, d.height);
    offscreensize = d;
    offgraphics = offscreen.getGraphics();
    offgraphics.setFont(getFont());
    offgraphics.setColor(getBackground());
    offgraphics.fillRect(0, 0, d.width, d.height);
    for (int i = 0 ; i < nedges ; i++) {
    Edge e = edges;
    int x1 = (int)nodes[e.from].x;
    int y1 = (int)nodes[e.from].y;
    int x2 = (int)nodes[e.to].x;
    int y2 = (int)nodes[e.to].y;
    int len = (int)Math.abs(Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)) - e.len);
    offgraphics.setColor((len < 10) ? arcColor1 : (len < 20 ? arcColor2 : arcColor3)) ;
    offgraphics.drawLine(x1, y1, x2, y2);
    if (showit) {
    String lbl = String.valueOf(len);
    offgraphics.setColor(showitColor);
    offgraphics.drawString("href= http://localhost:"+lbl, x1 + (x2-x1)/2, y1 + (y2-y1)/2);
    offgraphics.setColor(edgeColor);
    } //ef5
    FontMetrics fm = offgraphics.getFontMetrics();
    for (int i = 0 ; i < nnodes ; i++) {
    paintNode( offgraphics, nodes, fm); //or
    g.drawImage(offscreen, 0, 0, null);
    public synchronized boolean mouseDown(Event evt, int x, int y) {
    double bestdist = Double.MAX_VALUE;
    for (int i = 0 ; i < nnodes ; i++) {
    Node n = nodes;
    double dist = (n.x - x) * (n.x - x) + (n.y - y) * (n.y - y);
    if (dist < bestdist) {
    pick = n;
    bestdist = dist;
    pickfixed = pick.fixed;
    pick.fixed = true;
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    public synchronized boolean mouseDrag(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    } //e-pubsyncmousedrag
    public synchronized boolean mouseUp(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    pick.fixed = pickfixed;
    pick = null;
    repaint();
    return true;
    public void start() {
    relaxer = new Thread(this);
    relaxer.start();
    public void stop() {
    relaxer.stop();
    public class Box extends Applet {
    GraphPanel panel;
    public void init() {
    setLayout(new BorderLayout());
    panel = new GraphPanel(this);
    add("Center", panel);
    Panel p = new Panel();
    add("South", p);
    p.add(new Button("Reposition"));
    p.add(new Button("NewUrl"));
    p.add(new Checkbox("Showit"));
    String edges = getParameter("edges"); // putinli
    for (StringTokenizer t = new StringTokenizer(edges, ",") ; t.hasMoreTokens() ; ) {
    String str = t.nextToken();
    int i = str.indexOf('-');
    if (i > 0) { int len = 50;
    int j = str.indexOf('/');
    if (j > 0) {
    len = Integer.valueOf(str.substring(j+1)).intValue();
    str = str.substring(0, j);
    panel.addEdge(str.substring(0,i), str.substring(i+1), len);
    } //ef8
    Dimension d = size();
    String center = getParameter("center");
    if (center != null){
    Node n = panel.nodes[panel.findNode(center)];
    n.x = d.width / 2;
    n.y = d.height / 2;
    n.fixed = true;
    } // eif
    } // ep
    public void start() {
    panel.start();
    public void stop() {
    panel.stop();
    public boolean action(Event evt, Object arg) {
    if (arg instanceof Boolean) {
    if (((Checkbox)evt.target).getLabel().equals("Showit")) {
    panel.showit = ((Boolean)arg).booleanValue();
    }// e-
    else {
    panel.random = ((Boolean)arg).booleanValue();
    return true;
    } // e-if instof bool
    if ("Reposition".equals(arg)) {
    Dimension d = size();
    for (int i = 0 ; i < panel.nnodes ; i++) {
    Node n = panel.nodes;
    if (!n.fixed) {
    n.x = 10 + (d.width-20)*Math.random();
    n.y = 10 + (d.height-20)*Math.random();
    } //ei
    } //ef9
    return true;
    } //eif scram
    if ("NewUrl".equals(arg)) {
    Dimension d = size();
    URL url = getCodeBase();
    try {
    getAppletContext().showDocument( new URL(url+"main.htm"), "_blank" );
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e) { }
    } catch(MalformedURLException e) {
    showStatus("814 URL not found");
    for (int i = 0 ; i < panel.nnodes ; i++) {
    Node n = panel.nodes;
    if (!n.fixed) {
    n.x += (80*0.02) - 40;
    n.y += (80*0.02) - 40;
    return true;
    } //ei
    return false;
    -----------------------htm file to launch------------------------------
    <html>
    <head>
    <title>R
    </title>
    </head>
    <body>
    <h3>
    <center>
    R
    </center>
    </h3>
    I
    <b>
    </b>
    <table border = 1>
    <td>De<td>Test List<tr>
    <td>N <td><tr>
    <td>N <td><tr>
    </table>
    <b>view </b>
    <applet code="Box.class" CODEBASE=. width=1000 height=600
    ALT="Test ">
    <param name=edges value="http:xxabc.htm-http:xxnet.htm,http:xxthis.htm-http:xx.comet.htm,http:xxnewsighting.htm-http:xxstar.htm,http:xxmoon.htm-http:xxNeptune.htm">
    <hr>
    </applet>
    </b>
    <p>
    <table border = 1>
    <tr>
    <tr>
    </table>
    </html>
    </body>
    instructions to compile :
    0 : The discussion becomes easy to follow after 1st compiling
    & viewing the applet.
    1. : cut out applet code.
    2. : the post somehow deleted all references to "" <--- HERE
    see, the data has been deleted again as I preview this post.
    ( that "" should contain an "i" array increment argument:
    "open square bracket" "i" "close square bracket" ) array
    so "javac Box.java" will get 10 errors. These "[" "i" "]"
    array args must be replaced to compile the code.
    3. : All array variables inside the 10 "for" loops ( the bare words
    "edges" and "nodes" ) without array increment "i" should
    read "edges" "[" "i" "]" & "nodes" "[" "i" "]".
    The 10 location lines are approx:
    line #65, #129, #136, #149, #195, #283, #311, #331, #477, #522
    4. : These 10 edits reqresent a missing "i" to all 10 for loop arrays.
    for eddges & nodes. fix this & javac Box.java" will get
    4 class files.
    5. : cut "Box.htm" from post & do "appletviewer Box.htm"
    or put in an apache "htdoc" or tomcat "servlet" http delivered
    directory & call "http://localhost/Box.htm.
    6. : of course, selecting the event button "NewUrl" will not
    work in appletviewer but will work in an http web location.
    7. : post your questions to problem or fixes to problem as I'm
    monitoring closely. TIA.

    Thanks for code post tip to fix array deletion problem.
    Here is code reposted using delimiters with will
    compile straight out of cut/paste.import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import java.applet.Applet;
    import java.applet.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.event.*;
    class Node {
    double x;
    double y;
    double dx;
    double dy;
    boolean fixed;
    String lbl;
    class Edge {
    int from;
    int to;
    double len;
    } // eEdgeCla
    class GraphPanel extends Panel implements Runnable {
    Box box;
    int nnodes;
    Node nodes[] = new Node[100];
    int nedges;
    Edge edges[] = new Edge[200];
    Thread relaxer;
    boolean showit;
    boolean random;
    GraphPanel(Box box) {
    this.box = box;
    } //ebox
    int findNode(String lbl) {
    for (int i = 0 ; i < nnodes ; i++) {
    //if (nodes.lbl.equals(lbl)) {
    if (nodes.lbl.equals(lbl)) {
    return i;
    return addNode(lbl);
    int addNode(String lbl) {
    Node n = new Node();
    n.x = 10 + 380*Math.random();
    n.y = 10 + 380*Math.random();
    n.lbl = lbl;
    nodes[nnodes] = n;
    return nnodes++;
    void addEdge(String from, String to, int len) {
    Edge e = new Edge();
    e.from = findNode(from);
    e.to = findNode(to);
    e.len = len;
    edges[nedges++] = e;
    public void run() {
    int i3=0;
    while (true) {
    relax();
    if (random && (Math.random() < 0.03)) {
    Node n = nodes[(int) (1 * nnodes) ]; // no
    if (!n.fixed) {
    n.x += (100*0.02) - 50;
    n.y += (100*0.02) - 50; //
    try {
    Thread.sleep(4000);
    } catch (InterruptedException e) {
    break;
    i3++;
    } //ew
    } // epublrun()
    synchronized void relax() {
    for (int i = 0 ; i < nedges ; i++) {
    //Edge e = edges;
    Edge e = edges[i];
    double vx = nodes[e.to].x - nodes[e.from].x;
    double vy = nodes[e.to].y - nodes[e.from].y;
    double len = Math.sqrt(vx * vx + vy * vy);
    //double f = (edges.len - len) / (len * 3) ;
    double f = (edges[i].len - len) / (len * 3) ;
    double dx = f * vx;
    double dy = f * vy;
    nodes[e.to].dx += dx;
    nodes[e.to].dy += dy;
    nodes[e.from].dx += -dx;
    nodes[e.from].dy += -dy;
    } //efo
    for (int i = 0 ; i < nnodes ; i++) {
    //Node n1 = nodes[i];
    Node n1 = nodes[i];
    double dx = 0;
    double dy = 0;
    for (int j = 0 ; j < nnodes ; j++) {
    if (i == j) {
    continue;
    Node n2 = nodes[j];
    double vx = n1.x - n2.x;
    double vy = n1.y - n2.y;
    double len = vx * vx + vy * vy;
    if (len == 0) {
    dx += 0.02;
    dy += 0.02;
    } else if (len < 100*100) {
    dx += vx / len;
    dy += vy / len;
    } //ef3a
    double dlen = dx * dx + dy * dy;
    if (dlen > 0) {
    dlen = Math.sqrt(dlen) / 2;
    n1.dx += dx / dlen;
    n1.dy += dy / dlen;
    } //ef3
    Dimension d = size();
    // f4
    for (int i = 0 ; i < nnodes ; i++) {
    //Node n = nodes;
    Node n = nodes[i];
    if (!n.fixed) {
    n.x += Math.max(-5, Math.min(5, n.dx));
    n.y += Math.max(-5, Math.min(5, n.dy));
    if (n.x < 0) {
    n.x = 0;
    } else if (n.x > d.width) {
    n.x = d.width;
    if (n.y < 0) {
    n.y = 0;
    } else if (n.y > d.height) {
    n.y = d.height;
    n.dx /= 2;
    n.dy /= 2;
    repaint();
    Node pick;
    boolean pickfixed;
    Image offscreen;
    Dimension offscreensize;
    Graphics offgraphics;
    final Color fixedColor = Color.green;
    final Color selectColor = Color.gray;
    final Color edgeColor = Color.black;
    final Color nodeColor = new Color(200, 90, 50);
    final Color showitColor = Color.gray;
    final Color arcColor1 = Color.black;
    final Color arcColor2 = Color.orange;
    final Color arcColor3 = Color.blue;
    public void paintNode( Graphics g, Node n, FontMetrics fm) {
    int x = (int)n.x;
    int y = (int)n.y;
    g.setColor((n == pick) ? selectColor : (n.fixed ? fixedColor : nodeColor));
    int w = fm.stringWidth(n.lbl) + 10;
    int h = fm.getHeight() + 4;
    g.fillRect(x - w/2, y - h / 2, w, h);
    g.setColor(Color.black);
    g.drawRect(x - w/2, y - h / 2, w-1, h-1);
    String doit = n.lbl.replace('x','/');
    g.drawString(doit, x - (w-10)/2, (y - (h-4)/2) + fm.getAscent());
    } // epa
    public synchronized void update(Graphics g) {
    Dimension d = size();
    if ((offscreen == null) || (d.width != offscreensize.width) || (d.height != offscreensize.height)) {
    offscreen = createImage(d.width, d.height);
    offscreensize = d;
    offgraphics = offscreen.getGraphics();
    offgraphics.setFont(getFont());
    offgraphics.setColor(getBackground());
    offgraphics.fillRect(0, 0, d.width, d.height);
    for (int i = 0 ; i < nedges ; i++) {
    //Edge e = edges;
    Edge e = edges[i];
    int x1 = (int)nodes[e.from].x;
    int y1 = (int)nodes[e.from].y;
    int x2 = (int)nodes[e.to].x;
    int y2 = (int)nodes[e.to].y;
    int len = (int)Math.abs(Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)) - e.len);
    offgraphics.setColor((len < 10) ? arcColor1 : (len < 20 ? arcColor2 : arcColor3)) ;
    offgraphics.drawLine(x1, y1, x2, y2);
    if (showit) {
    String lbl = String.valueOf(len);
    offgraphics.setColor(showitColor);
    offgraphics.drawString("href= http://localhost:"+lbl, x1 + (x2-x1)/2, y1 + (y2-y1)/2);
    offgraphics.setColor(edgeColor);
    } //ef5
    FontMetrics fm = offgraphics.getFontMetrics();
    for (int i = 0 ; i < nnodes ; i++) {
    //paintNode( offgraphics, nodes, fm); //or
    paintNode( offgraphics, nodes[i], fm); //or
    g.drawImage(offscreen, 0, 0, null);
    public synchronized boolean mouseDown(Event evt, int x, int y) {
    double bestdist = Double.MAX_VALUE;
    for (int i = 0 ; i < nnodes ; i++) {
    //Node n = nodes;
    Node n = nodes[i];
    double dist = (n.x - x) * (n.x - x) + (n.y - y) * (n.y - y);
    if (dist < bestdist) {
    pick = n;
    bestdist = dist;
    pickfixed = pick.fixed;
    pick.fixed = true;
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    public synchronized boolean mouseDrag(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    } //e-pubsyncmousedrag
    public synchronized boolean mouseUp(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    pick.fixed = pickfixed;
    pick = null;
    repaint();
    return true;
    public void start() {
    relaxer = new Thread(this);
    relaxer.start();
    public void stop() {
    relaxer.stop();
    public class Box extends Applet {
    GraphPanel panel;
    public void init() {
    setLayout(new BorderLayout());
    panel = new GraphPanel(this);
    add("Center", panel);
    Panel p = new Panel();
    add("South", p);
    p.add(new Button("Reposition"));
    p.add(new Button("NewUrl"));
    p.add(new Checkbox("Showit"));
    String edges = getParameter("edges"); // putinli
    for (StringTokenizer t = new StringTokenizer(edges, ",") ; t.hasMoreTokens() ; ) {
    String str = t.nextToken();
    int i = str.indexOf('-');
    if (i > 0) { int len = 50;
    int j = str.indexOf('/');
    if (j > 0) {
    len = Integer.valueOf(str.substring(j+1)).intValue();
    str = str.substring(0, j);
    panel.addEdge(str.substring(0,i), str.substring(i+1), len);
    } //ef8
    Dimension d = size();
    String center = getParameter("center");
    if (center != null){
    Node n = panel.nodes[panel.findNode(center)];
    n.x = d.width / 2;
    n.y = d.height / 2;
    n.fixed = true;
    } // eif
    } // ep
    public void start() {
    panel.start();
    public void stop() {
    panel.stop();
    public boolean action(Event evt, Object arg) {
    if (arg instanceof Boolean) {
    if (((Checkbox)evt.target).getLabel().equals("Showit")) {
    panel.showit = ((Boolean)arg).booleanValue();
    }// e-
    else {
    panel.random = ((Boolean)arg).booleanValue();
    return true;
    } // e-if instof bool
    if ("Reposition".equals(arg)) {
    Dimension d = size();
    for (int i = 0 ; i < panel.nnodes ; i++) {
    //Node n = panel.nodes;
    Node n = panel.nodes[i];
    if (!n.fixed) {
    n.x = 10 + (d.width-20)*Math.random();
    n.y = 10 + (d.height-20)*Math.random();
    } //ei
    } //ef9
    return true;
    } //eif scram
    if ("NewUrl".equals(arg)) {
    Dimension d = size();
    URL url = getCodeBase();
    try {
    getAppletContext().showDocument( new URL(url+"main.htm"), "_blank" );
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e) { }
    } catch(MalformedURLException e) {
    showStatus("814 URL not found");
    for (int i = 0 ; i < panel.nnodes ; i++) {
    //Node n = panel.nodes;
    Node n = panel.nodes[i];
    if (!n.fixed) {
    n.x += (80*0.02) - 40;
    n.y += (80*0.02) - 40;
    return true;
    } //ei
    return false;

  • Computer shuts down when I click on the list or grid display button

    I've uninstalled an reinstalled 3 times and instead of the computer shutting down when I start itunes as it was doing, it only does it when I click on the display as a list, grid or cover display button. However it seems to unistall some parts at the same time as I can't open it all afterwards (error message says its not installed). This started to occur after a couple of weeks of non use and when I last used it I purchased songs from itunes. I now have current version but didn't when it first statred to happen. Help!!

    Okay ... we'd better have a closer look at the minidumps the PC has been producing to see if they can turn up any additional information on what we're dealling with here.
    Open "My Computer", and see if you can find a directory called C:\Windows\Minidump. (That's where minidumps usually go on a PC, so long as the Systemroot hasn't been set to some other folder.)
    If it's been collecting minidumps, there should be files in there with names like "Mini(number-numbers).dmp"
    (If you have "Hide filename extensions for known file types" enabled in Windows, the ".dmp" extension may not appear on the dump files. The numbers in the file name will be different for each minidump, if minidumps are present.)
    Once we've tracked down some minidumps, we can have a go at analysing them.
    1. Download and install the Windows debugging tools from here:
    http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx
    2. Go to Start, All Programs, Debugging Tools For Windows, Windbg
    Once you open Windbg, you will presented with a blank screen.
    3. Click on "File > Symbol File Path". Here you will enter the symbols
    path. Symbols are needed to effectively debug.
    The path will be:
    SRVc:symbolshttp://msdl.microsoft.com/download/symbols
    4. Enter in this path and click OK. Now, go to "File > Save Workspace"
    so that your symbols path is saved for future use.
    5. Go to "File > Open Crash Dump" and load the file.
    (An "Open Crash Dump" screen will appear ... doubleclick "My Computer", doubleclick "Local Disk", doubleclick "Windows", doubleclick "Minidump", and doubleclick on one of the minidumps in there.)
    You will/should get a message to save base workspace information. Choose no.
    Now you will get a debugging screen. It takes a little bit to run it,
    as the symbols have to be downloaded as they are needed.
    After the "bugcheck analysis" part of the screen comes up, look for the component that seems to be causing the crash. (It'll say "Probably caused by" ...)
    Let us know the precise name of the component. (Include any file name extensions like .dll or .sys.)
    If you can, have a look at several of your crash dumps. Are all the crashes being caused by the same component? If not, could you let us know the names of the various components being cited in the various crash dumps?

Maybe you are looking for

  • How to switch off Datafinder

    Hello We work with a database and don't use the DataFinder service of Diadem. How can I switch off DataFinder - in the way it doesn't launch the next time Windows starts? Thanks James Code

  • Error at the time of generating sgen

    Hi Experts, I was getting error of Runtime exceeded when I was trying sgen on the system.So I tried adding parameter as mentioned in error "rdisp/max_wprun_time" in instance profile in extended maintenance and gave value as 1000. But after that it st

  • I've had to reset my sons iCloud password as we forgot it and it's still saying incorrect password! Any ideas? As we can't even get online on his iPad..

    I've had to reset my sons iCloud password as we forgot it and it's still saying incorrect password! Any ideas? As we can't even get online on his iPad..

  • Data load trouble

    Hi all, trying to load data into my tables.But none is working properly. The loading result is below: table source_file size Succeeded (in rows) Failed (in rows) t1 file1.csv 4.75 Mo 3533 24091 t2 file2.csv 3.60 Mo 0 16.120 Didn't receive any error m

  • No Rows in APEX_PLSQL_JOBS View

    Gurus, I am not seeing any rows in this (APEX_PLSQL_JOBS) view for any operations been done. I am trying to query up this view from teh toad to get teh status of the job that was submitted from a Apex Session/screen. I am able to display the id ( job