Case condition- color change

Hi,
i wanted to add a case condition in which it sshould change the colour of the row else none. it possible in obiee
thanks

Hi,
Create a new column in your report with your case statement : CASE condition then 1 else 0 End (and hide it)
Go to your column for which you want to change the color of the row the go to the properties and specify a conditional formatting based on your condition.
If 1 then apply color elso nothing.
Regards
Adil

Similar Messages

  • Report row color change based on condition

    I have follow this forum steps Re: Color Row In Report
    Column Template 1
    <td #ALIGNMENT# class="t1data" style="background-color:#ADD8E6;">#COLUMN_VALUE#</td>
    PL/SQL expression condition
    '#2#' = 'BOOKED'
    Column Template 2
    <td #ALIGNMENT# class="t2data" style="background-color:#FFE87C;">#COLUMN_VALUE#</td>
    PL/SQL expression condition
    '#2#' = 'ENTERED'
    http://img29.imageshack.us/img29/2792/apexcolor.png
    This does color change but for some rows the colors are highlighted wrong and when i mouse over the rows , it changes to wrong color.

    Hi,
    t1Data and t2Data sound like standard theme css class names.
    In my example, the colouring is done by the style attribute on the TD tag. For "normal" rows:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data"&gt;#COLUMN_VALUE#&lt;/td&gt;for highlighted rows:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data" style="background-color:red;"&gt;#COLUMN_VALUE#&lt;/td&gt;Have you defined "t1Data" and "t2Data" in STYLE tags on your page?
    Andy

  • TABLE CONTROL LINES COLOR CHANGE

    <i>Hi Friens.,
    I need small help ie.,
    Let us assume we have table control like this.,
    col1 |  col2  |  group |
    a1   |   b1   |  1
    a2   |   b2   |  1
    a3   |   b3   |  2
    a4   |   b4   |  2
    a5   |   b5   |  3
    a6   |   b6   |  3
    1) User need differentiation between groups to look and feel.,thats why I want to change the Line colors based on Group.,
    2) I am getting this one .,but I made case on Sy-stepl.,  while scrolling it is not showing correct .,
    3) Is there any good way to do this., like in ME21   CONDITIONS TAB at Item level</i>
    If any body have Idea., share with me.,
    <b>Thanks.,</b>
    <i><b>Surendher Reddy.Baddam</b></i>

    Re: TABLE CONTROL LINES COLOR CHANGE
    Posted: Nov 5, 2004 6:47 AM        Reply      E-mail this post 
    PBO >>>like thise.,
    LOOP AT itab WITH CONTROL tc4_400 CURSOR tc4_400-current_line.
    MODULE check_rej_hld_400.
    MODULE radio_checkbox_400.
    ENDLOOP.
    >>>
    MODULE radio_checkbox_400.
    DATA : l_stf TYPE i.
    DATA : l_hyd TYPE i,l_knr TYPE i.
    l_hyd = 1.
    LOOP AT SCREEN.
    IF screen-name = 'ITAB-BATCHNO'.
    IF itab-group = l_hyd. " this is group
    screen-intensified = 1.
    MODIFY SCREEN.
    ELSEIF
    screen-intensified = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDIF.
    ENDLOOP.
    ADD 2 TO l_hyd
    ENDMODULE.
    I made logic like this.,
    Thanks.,
    Surendher Reddy.Baddam

  • ICal Calendar Colors Changing On Their Own; iCloud Connection

    AGGRAVATING PROBLEM:
    Many in this forum have written recently about a problem ongoing for people with multiple iCal calendars where iCal calendar colors change "automatically" when you haven't selected those colors, or even "change back" before your eyes to some color your DIDN'T select after you select a new one.  If you log into iCloud on the Web and try to change the color of certain calendars, they refuse to change.  Try as you might, the color you want for your calendar won't "stick" and it is forced to be the wrong color on all your devices.  In some cases, even the names of some of the calendars cannot be changed.  On other calendars in your list, the colors and names will change fine. 
    Related symptoms:  Calendars you have deleted "come back."   Or, calendars you did not create yourself show up in your calendars list, such as "Calendar" or "Home" or even "Untitled."  Note that the problem seems to be most prevalent with calendars with names "Home," "Work," OR either of these words in the NAME of the calendar.  For instance, "Bob's Work" might get snagged (it can't be deleted without coming back or its color is stuck and "comes back"). 
    I spent a long time on the phone with a helpful Apple senior advanced specialist on this problem today.  We conducted a very large number of "experiments". Our family has two iPads, 2 iPhones, and 2 iMacs, so it was easy to rule things in or out.  I will present some information that may help.
    SOME OF WHAT APPEARS TO BE GOING ON:
    First, Apple has not resolved this.  But the problem appears to be related to iCloud, and NOT to individual devices.  After de-linking all of my individual devices from iCloud, I could change any of the colors or names at will on any given device, create new calendars and then change their colors to whatever I wish, delete calendars, change names...no problem.  However, after re-linking calendars to iCloud, all the problems mentioned above returned.  The chances that my iMacs, iPhones, and iPads are all causing the problem independently is very low. They also have slightly different OS versions on them, so it is not likely an a particular device OS, though that could be indirectly related.  Also, the colors "change back" within about the same time (usually a few seconds to up to 30 seconds) that it takes to do a "refresh" (i.e. an update) to the iCloud servers.  This when iCloud is turned on, and the absence of it when iCloud is turned off (for calendars), strongly suggests that it is the iCloud server and its interaction with your devices that the fundamental cause of the problem.
    Apple has said that they are aware of this problem and their engineers are working on a fix.  Historically, this can mean just a few days, or it could be a few months, years, or "whenever."  They don't give estimates of when it will be fixed.  Exactly WHY this is happening is unclear, but my guess is that it is a modification to the iCloud server code that Apple implemented without testing it thoroughly enough to discover this problem.  Apple does not admit to that, of course and I don't know if I am correct.
    A WORKAROUND SOLUTION THAT WORKED FOR ME:
    Please note this is a workaround and not a full fix.  Apple needs to run a patch on their iCloud server code.  Until then, I did the following which seems to have worked for me for now.  Read the whole list before deciding whether to proceed.  I don't guarantee it will work in all situations.
    Note...I found I was stuck for now with the color of ONE of my calendars.  If you are like me, you want to keep that one and work around it....
    Backup first... Make sure that your iCloud copy of your calendar data has the calendar event information you want to save - even if the color is wrong.  Log in at www.icloud.com and do a refresh to sync to the Cloud.  Check over your calendars online to make sure the event data appears to be there for all of your calendars (even if their color or name is not what you want).
    Steps:
    1.     Go to every device that you have linked to iCloud separately. Go into Settings, iCloud, and then uncheck the "Calendars" option.  This delinks your calendars for that device to iCloud.  As you do this on each device, when prompted, select "Keep On My" ..iPAD...iPhone...iMac... etc.  This will preserve the calendar information on the device so it won't be deleted.  I think this is safer, but you can click on "Delete" if you want, too.  Note - if one of your devices is an iMac, with OSX Lion and before, you may be forced (I was) to delete the iCloud calendars from the iMac.  So again, make sure they are backed up to the Cloud first (or somewhere else).
    3.     With the iCloud Calendars Option on all your devices still turned off, go to the WEB and log into iCloud.com.  You need to figure our which calendar iCloud won't let you change the color for.  You probably already know.  On iCloud.com, click on "Calendars," then click open your calendar list and select "EDIT" at the bottom of the dialog box.  One at a time, click on the color dots next to each calendar name and try to change the color (you can put any back after the test if you want). You will probably see a certain one that just goes right back to what you don't want.  This is the one for which the color is stuck, but you may be able to change the name of it now that your devices are unlinked from iCloud.
    4.     Still in iCloud.com, change the names and colors of any of the other calendars you wish to change.  Delete any empty calendars that mysteriously appeared without your wanting them.  Take note of all the calendars, names, and colors that are on the final list of calendars.
    5.     On EVERY device, BEFORE turning iCloud back on on ANY of them: Change the colors and/or names of calendars, delete calendars, etc. so that the calendar names and colors on the device are exactly the same as what you left in iCloud.com in the last step.
    6.   One at a time on each device, go back to Settings and then "iCloud" and check again the box for "Calendars."  You will be asked whether you want to "MERGE" your data with iCloud.  I selected MERGE to ensure I didn't lose anything.  Link each device again into iCloud one at a time.
    7.  When each device is back, go back to iCloud on the Web, or go into iCAL on one of your devices.  Set to view ALL calendars.  Look for duplicates of some of your events.  I found quite several as an artifact of "merging", but in my case it only took me about 5 minutes to go through quickly and delete the duplicates.  It deleted the duplicates on all of the devices at once, so I only needed to delete dups on one device.  I did not find that I lost any events as long as I kept one valid copy.
    Again, no guarantees...hope this works for others.  Good luck.

    I'm getting the same thing and it's really bugging me! Keeps changing colour to one I do not want and I have tried everything to get it to stay the colour I have chosen!!

  • Af:table rollup row background color change

    Hi All
    i got below sql view object
    SELECT DEPARTMENT_ID,JOB_ID,COUNT(*) FROM EMPLOYEES GROUP BY DEPARTMENT_ID,ROLLUP(JOB_ID)
    By using this i will get each department_id, jobid's and total employes count in each department
    and i will get rollup for each departments ie i will get total employees.
    So i want to change the back ground of the total row.
    DepartmentId     JobId     Count1
    SA_REP      1
    1
    10     AD_ASST     1
    10          1 < this row in RED back ground in JSF page
    20     MK_MAN     1
    20     MK_REP     1
    20          2 < this row in RED back ground in JSF page
    30     PU_MAN     1
    30     PU_CLERK     5
    30          6< this row in RED back ground in JSF page
    40     HR_REP     1
    40          1< this row in RED back ground in JSF page
    50     ST_MAN     5
    50     SH_CLERK     20
    50     ST_CLERK     20
    50          45< this row in RED back ground in JSF page
    any kind of help is welcome...
    thanks
    Ravi

    Ravi,
    I think I answered the same question on the JDeveloper forum. The way it goes is that you use the inlineStyle property on the outputText component(s) of the total row. If you hard code the color then all backgrounds are identical, if you use EL to reference a managed bean method to return the color then you can have conditional color rendering
    Frank

  • The color change on my face how do i change back?

    the color change on my face how do i change back?

    No, its still there. Its a bult in iOS app and cannot be deleted.
    Check all of your folders and home screens to see it was accidentally moved.
    Check Restrictions to see if it is turned on and the Camera restricted (Settings app > General > Restrictions)
    Try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps from the tray before doing the reset.
    Reset your phone layout (Settings > General > Reset > Reset your Home Screen Layout). NOTE: this will move apps out of existing foldes and delete the folders.

  • Conditional Color Coded List

    I have done this in excel long time ago and I though it was going to be as simple as it was with excel.
    I'm trying to implement a conditional color coded list with the criteria below:
    Fields:
    - Health (blank cell that will change colors)
    - Due Date (cell with dates)
    Criteria:
    - Red if [due date] < date.now
    - Yellow if [due date] > date.now - 10
    - Green everything else
    How would I implement that in SharePoint?
    Thanks in advance
    ps:I'm not a C# programmer so I don' t know if the syntax for datetime or dude date column are right. 

    Hi mpaulopes,
    Here is a step by step guide reference to provision conditional formatting using SharePoint designer. It will give you proper idea about how to do this. It is for SP2010 however it won't make much difference.
    http://blog.sharepointrx.com/2010/12/03/conditional-formatting-and-date-comparisons-with-sharepoint-designer-2010/
    I hope this helps.
    Regards,
    Tapan

  • Case Condition not working

    I am trying to create a calculation based on the following case condition. For some reason its working fine on a existing report but now when I am creating a new report based on this, its giving error "Invalid Combinations of Condition and Calculations" any thoughts?
    I have also found out that when I am adding "ELSE" in the condition then only it's throwing that error otherwise working fine. I have also tried to recreate this case condition in my select statement and tested in TOAD and it runs without a problem.
    CASE WHEN ( Reference Date < TO_DATE(:Date) ) AND ( Support Start Date > TO_DATE(:Date) ) THEN TO_DATE(:Date) ELSE Reference Date END

    Try to wrap the "AND" and re-select the items into
    the case since it looks like the " are missing.
    CASE WHEN ( "Reference Date" < TO_DATE(:Date) AND
    "Support Start Date" > TO_DATE(:Date) ) THEN
    TO_DATE(:Date) ELSE "Reference Date" ENDTried that too but no luck :(. As I said before the same condition is working fine in another existing similar report. I am working on some changes in the existing report and when I am putting this condition it just throws this error message.
    Message was edited by:
    DiscoverDiscoverer

  • Photoshop CS6 save for web some colors change?

    I have a picture with large area of color: #fffdfd, when I save it for web (jpg) this color is changed to #fefcfd (in JPG).
    I just can not save as JPG with #fffdfd.
    (was trying uncheck convert to sRGB, do not embed color profile - always #fffdfd changes to #fefcfd when save for web)
    However, color #fefcfd when save for web , does not change.
    Why some colors change and some not? Is it a bug ?
    Window7 64bit, Photoshop CS6

    Save for Web & Devices will strip some color data from the file.
    Browsers aren't color managed. Most file formats on browsers assume they're sRGB. While Photoshop gives you an option of embedding sRGB to the document color space, it also strips off data that is not relevant. This is a common occurence.
    PNG-24 on the other hand will give you the exact color match.
    Also, Save for W&D, JPG quality matters a lot - The same color at Quality 10,20,30,40,50...100 wil give you different color reproductions on the JPG end output.
    If you're concerned that much about an offset of +/- 1 hex value to your RGB colorspace, dont save for web & devices. Do a 'Save As' instead. Then use an image editing/ resizing application such as ResizeMe to resize the quality of your document. This, in most cases will retain colorspace information but just drop the resolution and quality of the image - giving you a lesser filesize.
    On a sidenote, You may also want to read this article on how to best manage color spaces: http://viget.com/inspire/the-mysterious-save-for-web-color-shift

  • Color change between Illustrator versions

    When I'm opening an Illustrator cs file for a while back in Illustrator cs5, the colors change. When I try to open the cs file (eps) in Photoshop cs5, the colors change too. What setting am I missing? The document color mode is set on cmyk. Is it something inside of color settings? Thank you

    Ok... let me be more specific, sorry for the confusion. Here is exactly what's going on...
    Another designer is working in Illustrator CS and has created a logo that they provide to me in ai, eps, jpg, tif, png and gif. The jpg, tif, png and gif have been output from the eps file by opening the eps file in Photoshop and saving in the desired format. All these files have the same color.
    The issue is when I receive them and I want to either simply open the ai or eps in Illustrator CS5 (or CS3), or open the eps in Photoshop CS5 (or CS3) so I can save a big high res jpg for example, the color are lighter and not the same as the jpg provided from them. So I'm unable to create any files (jpg, gif, tif...) from the eps to match what was created before. Does that make sense?
    I have established that the other designer uses Illustrator CS and CMYK is selected for the 'document color mode' in Illustrator. When I work in Illustrator CS5 CMYK is also selected.
    When I have opened other eps files from the same Illustrator version, and looked at the files that were output from them, the colors are all the same, but in this case it is not. I'm wondering if I'm missing a setting somewhere or if this will always happen if you open an Illustrator CS eps inside Illustrator CS5.

  • How to integrate conditional colors to the Report

    <!--Hi all APEX gurus,
    I would like to ask if you could help me with the problem how to integrate conditional COLORS to the Report. I need to display Severity field in RED but how to include the multiple "quotation marks" and 'apostrophs' to the query below?
    I need to replace i."Severity" field in the query below with the DECODE like this:
    DECODE (i."Severity", 1, '<span style="color:red;font-weight:bold">' || i."Severity" || '</span>', i."Severity") "Severity"
    Original Query:
    DECLARE
    q varchar2(4000);
    BEGIN
    q := ' select ';
    q := q || ' i."ID" "ID", ';
    q := q || ' i."Task_ID" "Task ID", ';
    q := q || ' i."Severity" "Severity", ';
    q := q || ' i."Priority" "Priority", ';
    q := q || ' i."Task" "Task Name", ';
    q := q || ' p."Project_Name" "Project" ';
    q := q || ' from ';
    q := q || ' "IDEAS" i, ';
    q := q || ' "PROJECT_LOOKUP" p ';
    q := q || ' where ';
    q := q || ' p."Project_ID" = i."Project_ID" ';
    if :P1_Show != 'ALL' then
    q := q || ' and i."Project_ID" = :P1_Show';
    end if;
    RETURN q;
    END;
    I have tried many variants but still have problem with the " " and ' ' included in the DECODE command together with the q-variable.
    Thank you for any tips and
    Happy New Year!
    AB
    -->

    Hi user487406,
    What about a select like this:
    select i.id,
           i.task_id,
           case i.severity
             when 1 then '&#60;span style="color:red;font-weight:bold"&#62;' || i.severity || '&#60;/span&#62;'
           else
             to_char(i.severity)
           end severity,
           i.priority,
           i.task,
           p.project_name
      from ideas i,
           project_lookup p
    where p.project_id = i.project_id;
    And PL/SQL like this:
    q :=
    ' select i.id, ' ||
    '        i.task_id, ' ||
    '        case i.severity ' ||
    '          when 1 then ''&#60;span style="color:red;font-weight:bold"&#62;'' || i.severity || ''&#60;/span&#62;'' ' ||
    '          else ' ||
    '            to_char(i.severity) ' ||
    '        end severity, ' ||
    '        i.priority, ' ||
    '        i.task, ' ||
    '        p.project_name ' ||
    '   from ideas i, ' ||
    '        project_lookup p ' ||
    '  where p.project_id = i.project_id; '; Regards Pete

  • Rules applied to multiple cells trigger color changes when any of the cells

    "Rules applied to multiple cells trigger color changes when any of the cells meet the rule’s condition." That's what Help says, but when I follow the directions, it doesn't work. This is in Numbers 08.
    I have a table where the contents of one column are either "YES" or "NO", depending on formulas using variables from other cells. If YES, I want the fill of that cell and that of two adjacent cells to change from white to green. I select all three cells and use conditional format rules for "text contains:" YES, then choose my fill color. When I return to the table and introduce values for the variables that trigger the rule, only the cell in the YES/NO column changes to green; the other two remain white.
    While I am spreadsheet challenged, I usually can follow directions as plain as those in Help, but it's not working. I couldn't find anything in the discussions after an hour of searching. Is this a known problem or am I just stupid?

    For what it's worth, that's the way I read that line in the User Guide as well. What it actually appears to mean, though is 'Rules applied to multiple cells apply independently to each of the cells."
    Here's a workaround for your three adjacent columns. Long, but fairly simple steps.
    Add a second table to the sheet (Table 2).
    Resize the second table to one column wide and as many rows as you want to apply the conditional format to.
    Set the width of the column to the same width as the three columns you want to highlight, and the row height(s) to match the rows.
    Format to table to have NO Header or Footer row or column.
    Use the Wrap Inspector to uncheck "Object causes wrap"
    In the first top cell of Table 2, enter an = sign, then Click on Table 1 in the sidebar, Click on the first cell that will hold YES or NO.
    Fill the formula down the rest of Table 2.
    With all cells in Table 2 selected, use the Cell Format inspector to set the 'text contains yes' rule and the conditional fill colour for these cells.
    Test the conditional formating by introducing values into Table 1.
    Click on Table 1 in the sidebar, then use the Table inspector to set Cell Fill to 'none'.
    Click on Table 2 in the sidebar, then drag that table onto table 1 aligning it to cover the cells in which the conditional formating is to appear.
    When positioned (and still selected), go to the Arrange menu and Send Backward to move Table 2 behind the (transparent) cells in Table 1.
    With Table 2 still selected, click on the Cell Borders color well and set the Opacity of the borders to 0%.
    Click the Text inspector and set the Text colour Opacity for Table 2 to 0%.
    Regards,
    Barry

  • When importing photos from computer, all colors change to garish saturated

    I just imported some photos(jpgs) from my Windows XP/hard drive into Lightroom for the first time. All the colors changed to really garish, bright, highly saturated, in all views, on all photos. Faces are bright red, ground is bright orange, red clothing is blinding.
    This has happened one other time: when I make PDFs from Acrobat Professional. The colors turn all highly saturated and unnatural. Does anyone know why this is or how to help? I have 10,000 photos and they look fine in Photoshop, my Canon Zoombrowser, Windows viewers, everywhere else.
    Thanks.

    >Then I opened all 4 (including raw file) and the Raw, Adobe, and prophoto were identical, the remaining srgb pic was alot redder, like I had a red filter almost, just really warm
    In a color managed app, the three exports in prophotoRGB, adobeRGB and sRGB should look almost identical safe for some minor shifts if you have a wide gamut display or a display with a primary very different from sRGB (certain laptop displays). If they look different, and you are using a color managed app, chances are your monitor calibration is no good. Apps that are color managed are Photoshop, Safari, Apple's preview, Lightroom, recent versions of irfanview (older were not managed). Apps that are not color managed and will give you the wrong color on any display are Windows picture viewer pre vista, (internet) explorer, Google Picasa, etc. Let me assure you that Lightroom correctly exports to sRGB. They did not get this wrong.
    Conclusion: On a calibrated normal gamut display sRGB exports WILL look identical to Lightroom when you are using color managed apps to view your export. In non-managed apps, the colors will be close but there will be only minor color shifts that are usually only visible to critical viewers. On wide gamut displays in color managed apps there might be small differences in saturation i certain limited cases (flowers and such).

  • Simon Says Bot - color change issue

    Hi,
    I'd like to create an app that can play the internet game Simon Says ...
    I have a pretty good idea of the algorithm but lack some vital skills.
    This is what i got so far...
    package org.kodejava.example.awt;
    import java.awt.Color;
    import java.awt.Robot;
    import java.awt.AWTException;
    import java.awt.event.InputEvent;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.*;
    public class Bot {
         public static void main(String[] args) throws NumberFormatException,
                   IOException, AWTException {
              InputStreamReader isr = new InputStreamReader(System.in);
              BufferedReader in = new BufferedReader(isr);
              Robot robot = new Robot();
              ArrayList<Integer> volgorde = new ArrayList<Integer>();
              // TODO Auto-generated method stub
              System.out.println("tot hoeveel wil je gaan?");
              int tot = Integer.parseInt(in.readLine());
              int o = 10;
              try {
                   Thread.sleep(5000); // do nothing for 5000 miliseconds (5 second)
              } catch (InterruptedException e) {
                   e.printStackTrace();
              // 515 - 360
              robot.mouseMove(515, 360);
              // Press the mouse button #1.
              robot.mousePress(InputEvent.BUTTON1_MASK);
              robot.mouseRelease(InputEvent.BUTTON1_MASK);
              System.out.println("1");
              try {
                   Thread.sleep(2000); // do nothing for 5000 miliseconds (5 second)
              } catch (InterruptedException e) {
                   e.printStackTrace();
              System.out.println("2");
              Color rood = robot.getPixelColor(480, 370); // 500-400
              Color blauw = robot.getPixelColor(480, 580); // 500-520
              Color geel = robot.getPixelColor(690, 580); // 670-520
              Color groen = robot.getPixelColor(690, 370); // 670-400
              for (int i = 1; i < tot + 1; i++) {
                   System.out.println("test?");
                   int a = 0;
                   int b = 0;
                   do {
                        System.out.println("Do While");
                        if (!(rood.getBlue() < (robot.getPixelColor(480, 370).getBlue() + o)
                                  && rood.getBlue() > (robot.getPixelColor(480, 370)
                                            .getBlue() - o)
                                  && rood.getGreen() < (robot.getPixelColor(480, 370)
                                            .getGreen() + o)
                                  && rood.getGreen() > (robot.getPixelColor(480, 370)
                                            .getGreen() - o)
                                  && rood.getRed() < (robot.getPixelColor(480, 370)
                                            .getRed() + o)
                                  && rood.getRed() > (robot.getPixelColor(480, 370)
                                            .getRed() - o))) {
                             volgorde.add(1);// rood
                             b++;
                             a = 1;
                             System.out.println("rood");
                             try {
                                  Thread.sleep(500); // do nothing for 5000 miliseconds (5 second)
                             } catch (InterruptedException e) {
                                  e.printStackTrace();
                        if (!(groen.getBlue() < (robot.getPixelColor(690, 370).getBlue() + o)
                                  && groen.getBlue() > (robot.getPixelColor(690, 370)
                                            .getBlue() - o)
                                  && groen.getGreen() < (robot.getPixelColor(690, 370)
                                            .getGreen() + o)
                                  && groen.getGreen() > (robot.getPixelColor(690, 370)
                                            .getGreen() - o)
                                  && groen.getRed() < (robot.getPixelColor(690, 370)
                                            .getRed() + o)
                                  && groen.getRed() > (robot.getPixelColor(690, 370)
                                            .getRed() - o)) && a != 1) {
                             volgorde.add(2);// groen
                             b++;
                             a = 1;
                             System.out.println("groen");
                             try {
                                  Thread.sleep(500); // do nothing for 5000 miliseconds (5 second)
                             } catch (InterruptedException e) {
                                  e.printStackTrace();
                        if (!(geel.getBlue() < (robot.getPixelColor(690, 580).getBlue() + o)
                                  && geel.getBlue() > (robot.getPixelColor(690, 580)
                                            .getBlue() - o)
                                  && geel.getGreen() < (robot.getPixelColor(690, 580)
                                            .getGreen() + o)
                                  && geel.getGreen() > (robot.getPixelColor(690, 580)
                                            .getGreen() - o)
                                  && geel.getRed() < (robot.getPixelColor(690, 580)
                                            .getRed() + o)
                                  && geel.getRed() > (robot.getPixelColor(690, 580)
                                            .getRed() - o)) && a != 1) {
                             volgorde.add(3);// geel
                             b++;
                             a = 1;
                             System.out.println("geel");
                             try {
                                  Thread.sleep(500); // do nothing for 5000 miliseconds (5 second)
                             } catch (InterruptedException e) {
                                  e.printStackTrace();
                        if (!(blauw.getBlue() < (robot.getPixelColor(480, 580).getBlue() + o)
                                  && blauw.getBlue() > (robot.getPixelColor(480, 580)
                                            .getBlue() - o)
                                  && blauw.getGreen() < (robot.getPixelColor(480, 580)
                                            .getGreen() + o)
                                  && blauw.getGreen() > (robot.getPixelColor(480, 580)
                                            .getGreen() - o)
                                  && blauw.getRed() < (robot.getPixelColor(480, 580)
                                            .getRed() + o)
                                  && blauw.getRed() > (robot.getPixelColor(480, 580)
                                            .getRed() - o)) && a != 1) {
                             volgorde.add(4);// blauw
                             b++;
                             a = 1;
                             System.out.println("blauw");
                             try {
                                  Thread.sleep(500); // do nothing for 5000 miliseconds (5 second)
                             } catch (InterruptedException e) {
                                  e.printStackTrace();
                        a = 0;
                   } while (b < i);
                   System.out.println("kleur verandering gevonde");
                   for (int y = 0; y < i; y++) {
                        try {
                             Thread.sleep(1000); // do nothing for 1000 miliseconds (1
                             // second)
                        } catch (InterruptedException e) {
                             e.printStackTrace();
                        switch (volgorde.get(y)) {
                        case 1:
                             robot.mouseMove(500, 400);
                             robot.mousePress(InputEvent.BUTTON1_MASK);
                             robot.mouseRelease(InputEvent.BUTTON1_MASK);
                             System.out.println("rood click");
                             break;
                        case 2:
                             robot.mouseMove(670, 400);
                             robot.mousePress(InputEvent.BUTTON1_MASK);
                             robot.mouseRelease(InputEvent.BUTTON1_MASK);
                             System.out.println("groen click");
                             break;
                        case 3:
                             robot.mouseMove(670, 520);
                             robot.mousePress(InputEvent.BUTTON1_MASK);
                             robot.mouseRelease(InputEvent.BUTTON1_MASK);
                             System.out.println("geel click");
                             break;
                        case 4:
                             robot.mouseMove(500, 520);
                             robot.mousePress(InputEvent.BUTTON1_MASK);
                             robot.mouseRelease(InputEvent.BUTTON1_MASK);
                             System.out.println("blauw click");
                             break;
                   }volgorde.clear();
                   try {
                        Thread.sleep(400); // do nothing for 1000 miliseconds (1
                        // second)
                   } catch (InterruptedException e) {
                        e.printStackTrace();
              try {
                   Thread.sleep(400); // do nothing for 1000 miliseconds (1
                   // second)
              } catch (InterruptedException e) {
                   e.printStackTrace();
              robot.mousePress(InputEvent.BUTTON1_MASK); //press wrong button to ende game and save score ...
              robot.mouseRelease(InputEvent.BUTTON1_MASK);
              robot.mousePress(InputEvent.BUTTON1_MASK);
              robot.mouseRelease(InputEvent.BUTTON1_MASK);
              robot.mousePress(InputEvent.BUTTON1_MASK);
              robot.mouseRelease(InputEvent.BUTTON1_MASK);
    }it can handle a sequence of about 9 clicks long ... after that it doesn't detected all the color changes correctly and therefor waits for another change wich doesn't come ...
    is there anyway to speed up the change detection ? anyone know a faster algorithm than my 'do-while' function?
    help would be appreciated.
    Thnx in Advance,
    a rookie with an idea.
    Edited by: tooster on Sep 13, 2009 7:37 PM

    This won't speed it up, but I suggest making your code a lot cleaner by making use of this class (I haven't tested it):
    public class ColorRange {
       private Color min, max;
       public ColorRange(Color min, Color max) {
          this.min = min; this.max = max;
       public boolean contains(Color c) {
          return c.getGreen() >= min.getGreen() && c.getGreen() <= max.getGreen() &&
             c.getRed() >= min.getRed() && c.getRed() <= max.getRed() &&
             c.getBlue() >= min.getBlue() && c.getBlue() <= max.getBlue();
    //...SNIP...
    ColorRange blue, red, green, yellow; //initialize these
    //...SNIP...
       if ( blue.contains(robot.getPixelColor(640,480) ) {Furthermore, I would introduce constants for your sample locations:
    Point blueLoc = new Point(640, 480); //etcEdited by: endasil on 14-Sep-2009 10:21 AM

  • Color change in webdynpro abap

    Hi every one
    I want horizontal bar whose color changes according to condition applied.For this I had searched on sdn.For this I found  value comparision UI element .To set it values for different colors I found class CL_WD_GRAPHICAL_VALUE_CMP and method of it SET_COLOR_ABOVE_THRESHOLD,SET_COLOR_BELOW_THRESHOLD andSET_COLOR_BETWEEN_THRESHOLDS,but i dont know how to use to in my application.Can anyone Pls let code for using thisclass?
    Thanks and regards
    Edited by: prashant sharma on Apr 3, 2009 8:13 AM
    Edited by: prashant sharma on Apr 3, 2009 8:29 AM

    hi,
    Refer this doc.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0625002-596c-2b10-46af-91cb31b71393
    With this document , you will be able to change color of particular Cell.
    I hope you are refering to Cell as a Horizontal bar.
    Thanx.

Maybe you are looking for

  • Download and Upload speeds have been dropping sinc...

    I have recently been having seriously problems with my connection, every day the router appears to reset/crash, sometimes once and sometimes more than several times a day. This was the speed I was getting in December, everything was fine. Now this is

  • Line Graph - can I have more than two levels?

    Post Author: Deepa CA Forum: Charts and Graphs I am working on a line Graph for a client where the client needs the x-axis to show year, then month by Office for expenses. Crystal Reports XI. I can have two levels when I do change of by Transaction m

  • Plugin error with Intermedia

    Background: table with 8 text fields, 3 Intermedia fields (1 audio, 1 video, and 1 image) where binary data is stored in the table I have a JSP page that pulls the text data from the database. I have a servlet that pulls the audio and video data from

  • Failed when migrating third-party database, need your help

    hi, I use the quick migration function of SQL Developer, the step 4 could not passed, in this step 8 items checked, and the second(locate source plugin) item failed. I want find the detail reason, but I have no idea with the item. So If anyone know a

  • Firefox sync can I sync my smart TV to my pc

    I've got Windows 7 Home Premium and a all-in-one desktop pc (Inspiron one 2020, 4 GB RAM, 64-bit operating system and I'm wondering if I can sync my pc with my Samsung smart tv.