Drawing a special cursor: completely repaint everytime or only a region?

Hello, I'm currently building an application which displays a BufferedImage. When I move the cursor in the the component that displays the BufferedImage my app draws a special cursor. It's a square which is moved only if my current position is dividable by 16 (if there was a grid, it would change it's position when the mouse moves to another square in the grid, it is around the square that the mouse occupies). At first, I was only using on thread so the application was a little laggy and my cursor thing didn't work too well. So I decided to use another thread to take care of my cursor. The drawing is in another class (external to the drawing class), therefore, I use getGraphics (since my drawing class subclasses JComponent). I signal a draw by changing a variable. I have to erase my old cursor to draw the new one. The problem is that my component "'flashes" gray instead of staying the way it should be (which is black, for now). Here are my questions: Why does it flash gray ? and what should I do to change that?
Here's my code:
import java.awt.*;
import javax.swing.*;
import java.awt.geom.*;
import java.awt.image.*;
class Cursor implements Runnable {
     public boolean draw;
     public int[] iCursorCoord;
     public JComponent drawSurface;
     private Thread t;
     private Rectangle cursor;
     Cursor(){
          cursor = new Rectangle(0,0,15,15);
          t = new Thread(this);
          iCursorCoord = new int[2];
          iCursorCoord[0] = 0;
          iCursorCoord[1] = 0;
          draw = false;
          drawSurface = null;
     Cursor(int[] initCoord){
          cursor = new Rectangle(initCoord[0],initCoord[1],15,15);
          t = new Thread(this);
          iCursorCoord = new int[2];
          iCursorCoord[0] = 0;
          iCursorCoord[1] = 0;
          draw = false;
          drawSurface = null;
     Cursor(Rectangle rect){
          cursor = rect;
          t = new Thread(this);
          iCursorCoord = new int[2];
          iCursorCoord[0] = rect.x;
          iCursorCoord[1] = rect.y;
          draw = false;
          drawSurface = null;
     Cursor(JComponent drawSurf){
          cursor = new Rectangle(0,0,15,15);
          t = new Thread(this);
          iCursorCoord = new int[2];
          iCursorCoord[0] = 0;
          iCursorCoord[1] = 0;
          draw = false;
          drawSurface = drawSurf;
     Cursor(JComponent drawSurf, Rectangle rect){
          cursor = rect;
          t = new Thread(this);
          iCursorCoord = new int[2];
          iCursorCoord[0] = rect.x;
          iCursorCoord[1] = rect.y;
          draw = false;
          drawSurface = drawSurf;
     Cursor(JComponent drawSurf, int[] initCoord){
          cursor = new Rectangle(initCoord[0], initCoord[1], 15, 15);
          t = new Thread(this);
          iCursorCoord = new int[2];
          iCursorCoord[0] = initCoord[0];
          iCursorCoord[1] = initCoord[1];
          draw = false;
          drawSurface = drawSurf;
     public void init(){
          t.start();
     public void run(){
          while(true){
               if(!draw) continue;
               draw = false;
               cursor.x = iCursorCoord[0];
               cursor.y = iCursorCoord[1];
               System.out.println("Inside Cursor::run()");
               Graphics2D gfx = (Graphics2D) drawSurface.getGraphics();
               this.completePaint(gfx);
               Color current = gfx.getColor();
               gfx.setColor(new Color(84,255,3));
               gfx.draw(cursor);
               gfx.setColor(current);
     private void completePaint(Graphics2D gfx){
          int layer = MapMaker.getLayerMode();
          if(layer != 4){
               BufferedImage bi = MapMaker.getCurrentMap().getData(MapMaker.getLayerMode());
               gfx.setPaint(new TexturePaint(bi, new Rectangle(0,0,MapMaker.getCurrentMap().getWidth()*16, MapMaker.getCurrentMap().getHeight()*16)));
               gfx.fillRect(0, 0, MapMaker.getCurrentMap().getWidth()*16, MapMaker.getCurrentMap().getHeight()*16);
               //gfx.drawImage(bi, null, 0,0);     
          } else {//Will be implemented later, render will be modified
               System.out.println("Will be implemented later");
}P.S.: This is only part of my code. There are other classes that I do not post because I believe it is not necessary. I will post the full code if needed.

You need to override the paint(Graphics g) method. E.g.:
public class MyPanel extends JPanel {
     public void paint(Graphics g) {
               super.paint(g);
                // ... do draw code here
}The reason your app is flashing is because your code only executes
when the thread is requests it to. Inbetween the time your code is
executing, other threads are calling the paint(Graphics g) method.
Gray is the default color used in painting.
You can use a thread to call the repaint() method, but no drawing
should be done in the thread.

Similar Messages

  • Special cursor are not captured in Captivate 6

    We try to create software simulation of Russian analog of AutoCAD, named KOMPAS-3D.
    In this program we are working with CAD drawings. And then in this software we are moving mouse over some objects of drawing like line or circle (or section in 3d drawing) - cursor are changing to special cursor symbol.
    Important –> in this case cursor are changing not after mouse click. He changing with event mouseover.
    But then we try to capture work with  drawing in KOMPAS-3D – this special cursor symbols are not captured.
    We try to use AC 6 for this screen capturing  and can’t capture our special cursor symbols.
    But in AC 5.5 – its work fine!
    Help us please!

    Hi
    You might already know this, but stating it here to rule out the simple failure cases.
    I have had a similar problem in the past using VTML tags inside Captivate. I used to type the slidenotes in my favorite editor and then copy paste the text from there to the slidenotes panel of Captivate. Turns out that my editor was using Unicode and hence the entire text pasted into Captivate slidenotes became unicode text, including the VTML markers. Though the pasted text "looked" fine the markers were messed up (for example, the double quotes around the value attributes looked like double quotes but they were actually multibyte unicode sequences) and this confused Neospeech. The output audio would be funny (for example it would read "Less Than...V...T...M...L...") or NeoSpeech will crash taking down Captivate along with it.
    The fix was quite simple. I started typing the slide notes from within Captivate slide notes panel and everything worked fine after that. Alternately I could type in my favorite editor (after making sure that it is operating in Plain text mode) and then copy paste work flow also worked fine.
    Another common mistake (at least, I do that often) is to select the speech agent from the drop down at the top of the dialog and forgetting to choose the speech agents for individual slide notes, which may still be referring to a non-neo-speech agent which does not understand the VTML tags.
    No other software tool was required like the German Adobe Support team may have mentioned. I am using Captivate 7.
    Cheers
    Siva

  • How do I downgrade my complete Creative Cloud to only Photoshop & InDesign?

    Hi there,
    Is it possible to downgrade my Complete Creative Cloud to only Photoshop & InDesign? Because that are the only programs that we use. How much will that cost? Now it costs us €69,99 each month.
    And is there another pay method besides a credit card? Is it possible to pay from our private bankaccount from the Netherlands?
    Hopefully I hear soon from you!

    Cancel what you have
    Cancel http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html
    -or by telephone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html
    Buy the photography subscription
    Special Photography Plan (includes Bridge & Mobile Lightroom)
    http://helpx.adobe.com/creative-cloud/faq/mobileapps.html
    http://helpx.adobe.com/photoshop/kb/differences-photoshop-creative-cloud-photography.html
    Buy a single program subscription
    Cloud Plans https://creative.adobe.com/plans
    -and subscription terms http://www.adobe.com/misc/subscription_terms.html
    -what is in the entire Cloud http://www.adobe.com/creativecloud/catalog/desktop.html
    -http://www.adobe.com/products/catalog/mobile._sl_id-contentfilter_sl_catalog_sl_mobiledevi ces.html

  • Drawing a colored cursor on a text area given coordinates

    Hi all,
    Does anybody know how to draw a telepointer ( ie. a small coloured arrow like the cursor) given point coordinates on a text area? Please help.

    This may help... just set the transparency in the png or use a gif
    Image cur = getImage(getDocumentBase(), "cursor.png");
    Cursor myCursor = Toolkit.getDefaultToolkit().createCustomCursor(cur, new Point(0, 0), "name");
    textarea.setCursor(myCursor);

  • How to select a set of points in a xy graph contained in an area draw with the cursor ?

    I'm using tIhe XY graph to plot a Pointcare representation of RR intervals (heart beat). I would like to use the mouse to draw a polygone surrounding the points of interest and get their indexes from the original array. Thank you to oriented me to some strategy!
    Olivier 
    Solved!
    Go to Solution.

    This can be done, but unfortunately is not trivial. Since this is the second request I have seen in the last week for this type of functionality, I would encourage you to post the idea to the LabVIEW Idea Exchange.
    All graphs have a front, middle, and back image, which is set using a picture control data type.  You can use this to draw your cursor using an unfilled rectangle.  You can capture mouse events on the XY graph using the event structure, and update your enclosed rectangle (or ellipse, or whatever you would like to draw) when the mouse moves.  You can extract the enclosed data points from your original data set when a mouse up event occurs or when the user clicks inside the rectangle after drawing it.  You may also want to include ways to tweak the boundaries of the rectangle.
    This is relatively straightforward if you have used the event structure before, but could be very confusing if not.  Let us know if you need more information or help.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • I already use the single app plan for indesign and am wanting to add photoshop too. Do I qualify for the special offer complete package plan for existing cs customers or not?

    Hi there,
    I am just wondering what is the best way for me to do this - If i can qualify for the reduced rate complete package then this may be better value but I'm not sure if I do!

    Hi Charlie,
    You can go for the Photography plan which includes both Photoshop and Lightroom as a bundle and it will cost you $9.99 a month.
    Creative Cloud Photography plan | Adobe Creative Cloud
    Thanks,
    Nikhil Gupta

  • Please help me to draw a special line Chart!

    Hi, I am programming to draw a line chart with X-axis as timepoint (for example, t1, t2, t3, t4, ...) and Y-axis as values (v1, v2, v3,v4,...) and have a line connecting all the (t, v) point. The issue I have encountered is that when a value (for example, v3) is missing at the timepont(t3), I still want the timepoint to show on X-axis but the connectiong line to stop at (t2, v2) and start again at (t4, v4). Is it possible to draw such a line chart? Is there any 3rd party supporting it? If so, may you please give me hints and help me out of this? Thanks alot.

    I did find this:
    import java.awt.event.*;
    import java.awt.*;
    public class Pxy extends Frame 
    public Pxy()
         addWindowListener(new WindowAdapter()
        {     public void windowClosing(WindowEvent ev)
              {     dispose();
                   System.exit(0);}});
         setBounds(1,1,670,450);
         txy pan = new txy();
         add(pan);     
         setVisible(true);
    public class txy extends Panel
         int xt[] = {1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1};
         int yv[] = {40,15,30,90,105,128,120,98,199,250,269,203,90,210,200,145};
         int sx = 40;
         int sy = 30;
    public txy()
         super();
         setBackground(Color.pink);
    public void paint(Graphics g)
         g.setColor(Color.white);
         for (int i=0; i < 21; i++)
              g.setColor(Color.white);
              g.drawLine(i*30+sx,sy,i*30+sx,sy*10);
              g.setColor(Color.blue);
              g.drawString(""+i*30,i*sy+sy+2,30*10+30/2);
         for (int i=0; i < 10; i++)
              g.setColor(Color.lightGray);
              g.drawLine(sx,i*30+sy,20*30+sx,i*30+sy);
              g.setColor(Color.blue);
              g.drawString(""+i*30,10,i*sy+sy+2);
         g.setColor(Color.black);
         for (int i=0; i < xt.length-1; i++)
              if (xt[ i ] == 1)
              g.drawLine(i*30+sx,yv[ i ]+sy,(i+1)*30+sx,yv[ i+1 ]+sy);
    public void update(Graphics g)
         paint(g);
    public static void main(String[] args )
         new Pxy();

  • Tablet draws outside of cursor circle...

    You know the little circle that acts as the 'paintbrush tip'? For some reason, every time I draw, I'm not getting accuracy from within that circle, but it's like the paintbrush tip is on the top-left OUTSIDE side of the circle.
    How do I fix thiiiis?
    Using Photoshop CS6 Extended. Genius tablet.
    Also, does anyone know how to edit it so that you don't have to select a specific brush for sensitivity? ALso, is there any way to make the brush sharper and cleaner? It just looks blurry.

    Oh. Ugh. Well, Photoshop CS6 is just a bit too involved for me. I figured out that it was because of the brush I was on (So, I guess essentially a brush preset issue). I guess it was a caligraphic brush? So it was writing as if the pen was held at an angle.
    I just selected a different brush to test that (I thought the caligraphic brush tip was the only one that had pressure sensitivity on it, but just found that it isn't), and it works fine.
    Thanks for your time.

  • Dvd drawer will not close completely. Any suggestions?

    I have a HP Pavillion dm4. Operates windows home premium. 64 bit The dvd drawer stopped operating properly. Suggestions? Thx ed

    What do you mean by it stopped operating properly? Does it no longer open or does it not read DVDs? Can you explain more on what the issue is?
    Thanks
    Sean
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • Does cursor hit database everytime ??

    Hi seniors,
    I am little confused with the concept of the cursor. I juts want to know is cursor has anything to deal with the database hit.
    Explanation :
    Say for example I have a cursor which is returning the 1000 rows from multiple table then that recordset will stored in some named sql area called cursor.
    Now my question is when I loop the cursor will it get the actual data directly from the cursor OR It will just get an address location from the cursor to the actual database table or something.
    If possible please help me to clear this doubt.
    the reason being I have created one package which will move or drop the table with its all objects from all the schema available on the database server and it makes use of lot of cursor which are based on system views like all_table,all_trigger etc
    Thanks in advance.

    Example is :
    PROCEDURE move_table_pd
                            cTable                  in      varchar2,
                            cFromSchema             in      varchar2 := 'STI_COUNTRY_USA',
                            cToSchema               in      varchar2 := 'STI_COMMON',
                            nVerbosity              in      number   := 0,
                            nExecuteImmediate       in      number   := 1
            IS
            BEGIN
                    if ((cTable is not null) AND (cFromSchema is not null) AND (cToSchema is not null)) then
                            if (nVerbosity <> 0) then
                                    print_start_time_pd;
                            end if;
                            cTableName              :=      upper(cTable);
                            cSourceSchema           :=      upper(cFromSchema);
                            cDestinationSchema      :=      upper(cToSchema);
                            DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'PRETTY',false);
                            DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SQLTERMINATOR',false);
                            -- Step 1 : Create the table at destination schema if needed.
                            create_table_pd(cTableName,cSourceSchema,cDestinationSchema);
                            -- Step 2 : Create Sequences and Triggers for the table at destination schema if needed.
                            create_trigger_and_sequence_pd(cTableName,cSourceSchema,cDestinationSchema);
                            -- Step 3 : Create Indexes for the table at destination schema if needed and then drop the rest all indexes if any.
                            create_index_pd(cTableName,cSourceSchema,cDestinationSchema);
                            -- step 4 : Insert the data at destination schema table
                            populateTable_pd(cTableName,cSourceSchema,cDestinationSchema);
                            -- The last step is to Drop the table and we need to really take care here.
                            -- step 5 : Drop the table from all other schema except destination schema.
                            drop_table_pd(cTableName,cDestinationSchema);
                            -- Again create the public synonyms on table
                            create_and_grant_synonym_pd(cTableName,cTableName);
                            -- Step 6 : Now execute all the statements from the statement array.
                            executeStatement_pd(nVerbosity,nExecuteImmediate,cDestinationSchema);
                             if (nVerbosity <> 0) then
                                    print_end_time_pd;
                            end if;
                    end if;
            EXCEPTION
                    WHEN OTHERS THEN
                            null;
            END move_table_pd;
            PROCEDURE create_table_pd
                    cTableName in ALL_TABLES.TABLE_NAME%TYPE,
                    cSourceSchema in ALL_TABLES.OWNER%TYPE,
                    cDestinationSchema in ALL_TABLES.OWNER%TYPE
            IS
            BEGIN
                    -- Step 1 : Create or drop the table depending on the the tables schema.
                    if ((cTableName is not null) AND (cSourceSchema is not null))   then
                            FOR REC_TABLE IN cur_get_create_table_detail(cTableName,cSourceSchema)
                            LOOP
                            BEGIN
                                    if      (REC_TABLE.OWNER        =       cSourceSchema)  then
                                            --Get the DDL of the table
                                            cSqlStatement   :=      getObjectDDL_fd('TABLE',cTableName,REC_TABLE.OWNER);
                                            -- As This sql statement is with the source table schma name we need to replace that with the destination schema
                                            -- And then we should create the table.
                                            cSqlStatement   :=      FindAndReplace_fd(cSqlStatement,cSourceSchema,cDestinationSchema);
                                            -- Now first check whether the same table exist at destination schema or not if yes no need to create the same else create.
                                            nObjectFound    :=      isTableAlreadyExist_fd(cTableName,cDestinationSchema);
                                            if (nObjectFound = 0)   then
                                                    -- Now we are assured that the same table does not present at cDestinationSchema
                                                    -- So now we can push the statement to be executed in statements array.
                                                    pushStatement_pd(cSqlStatement);
                                                    cSqlStatement   :=      null;
                                            end if;
                                    end if;
                            EXCEPTION
                                    WHEN OTHERS THEN
                                            null;
                            END;
                            END LOOP;
                    end if;
            EXCEPTION
                    WHEN OTHERS THEN
                            null;
            END create_table_pd;
            PROCEDURE create_trigger_and_sequence_pd
                    cTableName              in      ALL_TABLES.TABLE_NAME%TYPE,
                    cSourceSchema           in      ALL_TRIGGERS.OWNER%TYPE,
                    cDestinationSchema      in      ALL_TRIGGERS.OWNER%TYPE
            IS
                    -- Procedure local variables.
                    -- for triggers details
                    cTriggerSchema        ALL_TRIGGERS.owner%TYPE;
                    cDescription          ALL_TRIGGERS.description%TYPE;
                    cTriggerBody          ALL_TRIGGERS.trigger_body%TYPE;
                    cTriggerName          ALL_TRIGGERS.trigger_name%TYPE;
                    -- for sequence details
                    cSequenceOwner          ALL_SEQUENCES.sequence_owner%TYPE       ;
                    cSequenceName           ALL_SEQUENCES.sequence_name%TYPE        ;
                    -- Check Trigger count on table
                    cTriggerCount   number  :=0;
            BEGIN
                    -- Step 2 : Create the sequences, triggers and there synonyms and grants  on the the tables schema.
                    if ((cTableName is not null) AND (cSourceSchema is not null) and (cDestinationSchema is not null))   then
                            FOR REC_TRIGGER IN cur_get_create_trigger_detail(cTableName,cSourceSchema)
                            LOOP
                            BEGIN
                                    cTriggerSchema  :=      REC_TRIGGER.owner       ;
                                    cDescription    :=      REC_TRIGGER.description ;
                                    cTriggerBody    :=      REC_TRIGGER.trigger_body;
                                    cTriggerName    :=      REC_TRIGGER.trigger_name;
                                    if      (cTriggerSchema =       cSourceSchema)  then
                                                    -- check the sequences for that trigger if any then create the same
                                                    FOR REC_SEQUENCE IN cur_get_create_sequence_detail(cTriggerName,cSourceSchema) LOOP
                                                            cSequenceOwner  :=      REC_SEQUENCE.sequence_owner;
                                                            cSequenceName   :=      REC_SEQUENCE.sequence_name;
                                                    BEGIN
                                                            if ((cSequenceName is not null) AND (cSequenceOwner     =       cSourceSchema)) then
                                                            --Get the DDL of the sequence
                                                            cSqlStatement   :=      getObjectDDL_fd('SEQUENCE',cSequenceName,cSequenceOwner);
                                                            -- As This sql statement is with the source sequence schema name we need to replace that with the destination schema
                                                            -- And then we should create the sequence.
                                                            cSqlStatement   :=      FindAndReplace_fd(cSqlStatement,cSourceSchema,cDestinationSchema);
                                                            -- Now first check whether the same sequence exist at destination schema or not if yes no need to create the same else create.
                                                            nObjectFound    :=      isSequenceAlreadyExist_fd(cSequenceName,cDestinationSchema);
                                                                    if (nObjectFound = 0)   then
                                                                            -- Now we are assured that the same sequence does not present at cDestinationSchema
                                                                            -- So now we can push the statement to be executed in statements array.
                                                                            pushStatement_pd(cSqlStatement);
                                                                            cSqlStatement   :=      null;
                                                                            -- First drop synonym and then create
                                                                            drop_synonym_pd(cSequenceName,cDestinationSchema);
                                                                            -- Create the public synonym for sequence and give the grants to the sequence
                                                                            -- As we know this sequence is the part of the trigger so we do not need
                                                                            -- to create the synoyms and grants for the same
                                                                            --create_and_grant_synonym_pd(cSequenceName,cSequenceName);
                                                                            -- And now drop this existing sequences
                                                                            drop_sequence_pd(cSequenceName,cSourceSchema,cDestinationSchema);
                                                                    end if;
                                                            end if;
                                                    EXCEPTION
                                                            WHEN OTHERS THEN
                                                                    null;
                                                    END;
                                                    END LOOP;
                                            -- Now first check whether the same table exist at destination schema or not if yes no need to create the same else create.
                                            nObjectFound    :=      isTriggerAlreadyExist_fd(cTriggerName,cDestinationSchema);
                                            if (nObjectFound = 0)   then
                                                    -- Now we are assured that the same table does not present at cDestinationSchema
                                                    -- So now we can push the statement to be executed in statements array.
                                                    -- Rather we can create the trigger using some different way as show below
                                                    -- Create trigger using different way
                                                    cDescription    :=      FindAndReplace_fd(UPPER(cDescription),cTableName,cDestinationSchema||'.'||cTableName);
                                                    cSqlStatement     :='CREATE OR REPLACE TRIGGER '||cDescription||UPPER(cTriggerBody);
                                                    pushStatement_pd(cSqlStatement);
                                                    cSqlStatement   :=      null;
                                            end if;
                                            -- Now drop the existing synonyms on triggers if any
                                            -- As we do not create the synonyms for triggers then we dont have to drop the same
                                            --drop_synonym_pd(cTriggerName,cDestinationSchema);
                                            -- Now drop the existing triggers from other schema
                                            -- We do not need to drop the triggers manually as it gets dropped along with the table.
                                            --drop_trigger_pd(cTriggerName,cSourceSchema,cDestinationSchema);
                                    end if;
                            EXCEPTION
                                    WHEN OTHERS THEN
                                            null;
                            END;
                            END LOOP;
                    end if;
            EXCEPTION
                    WHEN OTHERS THEN
                            null;
            END create_trigger_and_sequence_pd;
            PROCEDURE       create_index_pd
                    cTableName              in      ALL_INDEXES.TABLE_NAME%TYPE,
                    cSourceSchema           in      ALL_INDEXES.OWNER%TYPE,
                    cDestinationSchema      in      ALL_INDEXES.OWNER%TYPE
            IS
            BEGIN
            --cur_get_create_index_detail   index_name
                    if((cTableName is not null) AND (cSourceSchema is not null) AND (cDestinationSchema is not null) )      then
                            FOR REC_CREATE_INDEX IN cur_get_create_index_detail(cTableName,cSourceSchema)
                            LOOP
                                    BEGIN
                                            if      ((REC_CREATE_INDEX.index_name IS NOT NULL ) AND (REC_CREATE_INDEX.owner =       cSourceSchema))  then
                                                    --Get the DDL of the Index
                                                    cSqlStatement   :=      getObjectDDL_fd('INDEX',REC_CREATE_INDEX.index_name,REC_CREATE_INDEX.owner);
                                                    -- As This sql statement is with the source index schema name
                                                    -- we need to replace that with the destination schema
                                                    -- And then we should create the sequence.
                                                    cSqlStatement   :=      FindAndReplace_fd(cSqlStatement,cSourceSchema,cDestinationSchema);
                                                     -- Now first check whether the same index exist at destination schema or not
                                                     -- if yes no need to create the same else create.
                                                     nObjectFound    :=      isIndexAlreadyExist_fd(REC_CREATE_INDEX.index_name,cDestinationSchema);
                                                     if (nObjectFound = 0)   then
                                                            -- Now we are assured that the same index does not present at cDestinationSchema
                                                            -- So now we can push the statement to be executed in statements array.
                                                            pushStatement_pd(cSqlStatement);
                                                            cSqlStatement   :=      null;
                                                            -- Now as we have created a statement to create the index
                                                            -- So we need to check its existing Synonmyms and drop the same if exist
                                                            drop_synonym_pd(REC_CREATE_INDEX.index_name,cDestinationSchema);
                                                            -- Guess for Indexes we do not need to creat public synonym and no need to give grant to index
                                                            --create_and_grant_synonym_pd(REC_CREATE_INDEX.index_name,REC_CREATE_INDEX.index_name);
                                                             -- And now drop this existing indexes if any
                                                             --  We do not need to drop the indexes manually as it gets dropped along with the table.
                                                             -- drop_index_pd(REC_CREATE_INDEX.index_name,cSourceSchema,cDestinationSchema);
                                                     end if;
                                            end if;
                                    EXCEPTION
                                            WHEN OTHERS THEN
                                                    null;
                                    END;
                            END LOOP;
                    end if;
            EXCEPTION
                    WHEN OTHERS THEN
                            null;
            END create_index_pd;
            PROCEDURE       populateTable_pd
                    cTableName              in      ALL_TABLES.TABLE_NAME%TYPE,
                    cSourceSchema           in      ALL_TABLES.OWNER%TYPE,
                    cDestinationSchema      in      ALL_TABLES.OWNER%TYPE
            IS
            BEGIN
                    if((cTableName is not null) AND (cSourceSchema is not null) AND (cDestinationSchema is not null) )      then
                            nObjectFound    :=      isTableAlreadyExist_fd(cTableName,cSourceSchema);
                            if (nObjectFound <> 0) then
                                    cSqlStatement   :=      'INSERT INTO ' ||cDestinationSchema||'.'|| cTableName||
                                                            ' SELECT * FROM '||cSourceSchema||'.'||cTableName;
                                    pushStatement_pd(cSqlStatement);
                                    cSqlStatement   :=      null;
                            end if;
                    end if;
            EXCEPTION
                    WHEN OTHERS THEN
                            null;
            END populateTable_pd;
            PROCEDURE        executeStatement_pd
                    nVerbosity              in      number :=0,
                    nExecuteImmediate       in      number  := 1,
                    cExecuteOn              in      varchar2:=      'STI_COMMON'
            IS
            nTotalRecords   number  :=0;
            l_strsql LONG;
            cStmt varchar2(200);
            cError varchar2(300);
            cCurrentSchema  varchar2(50);
            BEGIN
                    if (aAllStatement is not null)  then
                            cCurrentSchema  :=      getCurrentSchema_fd;
                            if (nExecuteImmediate <> 0) then
                                    --altersession_pd;
                                    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'PRETTY',false);
                                    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SQLTERMINATOR',false);
                            end if;
                            nTotalRecords   :=      aAllStatement.COUNT;
                            if (nVerbosity <> 0)    then
                                    DBMS_OUTPUT.PUT_LINE('TOTAL STATEMENTS TO BE EXECUTED :'|| nTotalRecords);
                                    DBMS_OUTPUT.PUT_LINE('---------------------- EXECUTION BEGINS HERE -----------------');
                            end if;
                            --FOR cntr      in      1..nTotalRecords
                            FOR cntr      in      aAllStatement.FIRST..aAllStatement.LAST
                            LOOP
                                    BEGIN
                                            if aAllStatement.EXISTS(cntr) then
                                                    cSqlStatement :=        aAllStatement(cntr);
                                                    l_strsql := dbms_lob.SUBSTR( cSqlStatement, 32765, 1 );
                                                    if (nVerbosity <> 0)    then
                                                            DBMS_OUTPUT.PUT_LINE(cntr||' Now executing : '||cSqlStatement );
                                                    end if;
                                                    if (nExecuteImmediate <> 0)     then
                                                            if (l_strsql is not null)       then
                                                                    BEGIN
                                                                    --EXECUTE IMMEDIATE     cSqlStatement;
                                                                    EXECUTE IMMEDIATE       l_strsql;
                                                                    INSERT INTO gen_sql_log (t_sql_log_time,c_os_user,c_host,c_Server_Host,c_sql) VALUES (LOCALTIMESTAMP,sys_context('USERENV', 'OS_USER'),sys_context('USERENV', 'HOST'),sys_context('USERENV', 'SERVER_HOST'),l_strsql);
                                                                    EXCEPTION
                                                                            WHEN OTHERS THEN
                                                                                    cError:=substr(SQLERRM,1,300);
                                                                                    DBMS_OUTPUT.PUT_LINE('-------------<< ERROR >>-------------');
                                                                                    DBMS_OUTPUT.PUT_LINE('Error while running : '|| l_strsql);
                                                                                    DBMS_OUTPUT.PUT_LINE('');
                                                                                    DBMS_OUTPUT.PUT_LINE('Error Occured : '|| cError);
                                                                                    DBMS_OUTPUT.PUT_LINE('-------------<< END OF ERROR >>-------------');
                                                                    END;
                                                            end if;
                                                    end if;
                                            end if;
                                    EXCEPTION
                                            WHEN OTHERS THEN
                                                    null;
                                    END;
                            END LOOP;
                            aAllStatement.DELETE(aAllStatement.FIRST,aAllStatement.LAST);
                            --aAllStatement.TRIM(nTotalRecords);
                            nStatementCounter       :=0;
                            -- Move back to previous session
                            if (nExecuteImmediate <> 0) then
                                    --altersession_pd(cCurrentSchema);
                                    cCurrentSchema  :=      getCurrentSchema_fd;
                                    if (nVerbosity <> 0)    then
                                            DBMS_OUTPUT.PUT_LINE(' CURRENT SCHEMA : '|| cCurrentSchema);
                                     end if;
                            end if;
                            commit;
                    end if;
            EXCEPTION
                    WHEN OTHERS THEN
                    null;
            END executeStatement_pd;

  • Special cursor in mouse over area

    I am currently creating an application training for a rather
    advanced piece of software. This software uses several different
    cursors to indicate different actions in certain areas: for
    instance a hand, a triangle and two arrows.
    My question: is it possible in Captivate 1 to simulate this?
    So can I specify a specific cursor for a certain (mouse over) area?
    And if not, what would be the best way to work around this?
    Thanks!

    Hi Dutk,
    FYI (for your information) "HTH" isn't my name - Larry
    Walther is my name, and "CatBandit" is my screen name. "HTH" is
    simply shorthand for "hope this helps". No big deal, but didn't
    want you addressing me as HTH for the next five years.
    Sorry, but the mouse cursor cannot be changed mid-slide. That
    is, there cannot be two mouse cursors (the same image or different)
    on the same slide time-line. If you want to display changing
    cursors, you will have to either go to full-motion recording, or
    split the action into multiple slides, then change the cursor at
    the change of slide.
    Sorry I can't help more with that.
    .

  • Can you create two completely separate iCalendars with only one iTunes account?

    I'm trying to create a new calendar, but want it to be completely separate from the home ones we have. Is there a way to create a completely separate new iCalendar without having to have a new iTunes account?

    If I'm understanding you correctly... I would say yes...
    Under my same account I have a calendar for "Work", My "Family" and "Personal".
    I share the Family one and the other two are only seem by me

  • Re: Is it possible to completely recover VistaOS using only Recovery DVD?

    Hidden WinRE partition was deleted by mistake but I still got the original Recovery DVD for my A200.
    Is it possible to completely recover VistaOS without the WinRE partition, using only Recovery DVD?

    Of course.
    The Toshiba Recovery CD was designed to recover the notebook.
    Using the recovery CD you will get the factory settings.
    But note; the Toshiba recovery CD formats the whole HDD and erases the partitions from the HDD.
    Greets

  • Cursor Shift while trying edit in Editable Regions

    I do not have this problem on all of my sites, but I started
    experiencing it more and more often. I am inserting content into
    editable regions on my web site simply using copy and pasting, but
    I see that the when I click at the begining of a sentence or after
    or before a character or a word, in the code view it is shifted a
    character to the left ot the right.
    Lets say I put my cursor between G and H in the word LIGHTS
    and hit backspace to delete a character it deletes H insted of G.
    It shifts to the right on character each time and I cannot figure
    out why it is doing that. There are no hidden characters or
    anything like that.
    Your help is appreciated.
    Regards.

    Is this on a Mac? Is it in a container with an overflow
    style?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "centurypixel" <[email protected]> wrote in
    message
    news:e5plkv$1e0$[email protected]..
    >I do not have this problem on all of my sites, but I
    started experiencing
    >it
    > more and more often. I am inserting content into
    editable regions on my
    > web
    > site simply using copy and pasting, but I see that the
    when I click at the
    > begining of a sentence or after or before a character or
    a word, in the
    > code
    > view it is shifted a character to the left ot the right.
    >
    > Lets say I put my cursor between G and H in the word
    LIGHTS and hit
    > backspace
    > to delete a character it deletes H insted of G. It
    shifts to the right on
    > character each time and I cannot figure out why it is
    doing that. There
    > are no
    > hidden characters or anything like that.
    >
    > Your help is appreciated.
    >
    > Regards.
    >

  • How do you draw freehand lines like in Paint,I can only draw straight lines

    Hi,
    Im tryin to develop a page where people can practice writing foreign characters using a mouse, I can currently only get straight lines from my code and was wondering what i would have to do for my lines to follow the movements of the user? As this would be more helpful!
    (is it some sort of FOR loop with a repaint() method occuring at a regular interval??)
    Yours Thankfully
    Raj

    was wondering what i would have to do for my lines to follow the movements of the userKeep track of the mouse x and y coordinates starting with mousePressed, continuing with every detected mouseMoved and terminating on mouseReleased. As a new set of coordinates is formed, redraw and repaint!
    ;o)
    V.V.

Maybe you are looking for

  • Error occured while Saving The Project

    I have a project that is giving me a 'unknown error occurred while saving the project. Select 'Save As' from the file menu and save the project to a new location'. It would seem that maybe it's saying that it's out of room but I'm saving on a harddis

  • Splitting XML Files without namespaces

    Hello, I have a file that looks similar to this: <?xml version="1.0" encoding="UTF-8"?> <File>  <Header>   <Location>Phoenix</Location>   <Date>052214</Date>    </Header>    <Bill></Bill>  <Trailer>   <Total>1076</Total>  </Trailer> </File> What I wo

  • Dont want i tunes library in my documents

    I have installed i tunes onto my PC and dont want to store my music library in my documents/my music because i have been told that storing stuff on my documents will slow my PC down considerably. Can i change the default setting and put my library in

  • BAPI AR AP hedge plan

    Dear Expert, My customer requirement is to flow AR AP invoice with foreign currency to hedge plan automatically. So my queries are as follows: 1) what kind of bapi/interface that I have to activate? 2) if sap don't have, can we use tcode THMRO - expo

  • Separate Purchase order for Planned Delivery cost

    We have a scenario where we buy material from supplier A and delivery freight services provided by Supplier B. We raise a purchase order for suppler A for the material we buy, PO number 450000001 We add a freight cost condition type in the same PO 45