Next Canvas

Hello Experts,
I have Table that save a color (specific color) ,
i want to change this color for all forms included windows and canvases at Runtime (by Code) .
My problem is : i can't move from canvas to canvas to change its color
- no next canvas code - like next block
can you help me ?

Hello,
You have to get the Canvases trhough the items.
<p>Look at this White Paper that show how to loop through the Forms objects to change the colors.</p>
Francois

Similar Messages

  • Stacked Canvas - FRM-40202

    I having this problem with my form. I getting a FRM-40202 error when trying to run my
    form which has two stacked and 1 content canvas.I have tried hiding the canvas.
    hide_view('canvas150'); go_item('control_block.pwo_nbr');
    AURUT is the content one.
    canvas150 is the stacked canvas I don't want to see.
    AWR is the stacked canvas i would like to see.
    the data blocks are as followed:
    reports
    range1 and range 2 are associated with the canvas150.
    range 3 and range 4 are associated with the AWR canvas.
    The first problem I have is that the AURUT canvas has the canvas150 canvas on top of it
    I tried deleted the canvas150 canvas and recreated it but it is still on top.of the content one and I also have a stacked canvas(canvas150) in my form.
    I think that my form is corrupt. How can I fixed this problem without redoing the whole form? I tried created a contol_block and assigning the items to the control_block in my program unit. But I still see canvas150. I getting frm-40202 error. What I have read about this error is that a field in my canvas150 needs to be filled in before it will allowed me to continue to the next canvas(AWR). I don't even want to see canvas150 while I processing the items on AWR. I'm lost as to what i can do to fixed this problem. If I changed the field in question in canvas150 to "NOT REQUIRED" my form crashes.
    I didn't have this problem with my first stacked canvas. Introducing my second stacked canvas has cause this problem.
    Thanking in advanced

    If I changed the field in question in canvas150 to "NOT REQUIRED" my form crashes.This should not happen. What happens when it crashes? Is there an error message when the crash occurs?

  • ORA-01422: exact fetch returns more than requested number of rows

    HI All,
    I am using oracle forms 10 and my db is 10g
    I have developed a Query find window(ie a canvas to find the data in the table and it will movethe navigat with 10 fields,namely like po number ,guarantee number , guarantee type, issue date,expiry date etc.
    when the user enter the po number in the query find window and click find button i am getting this error.When i ckick ok to that error and its move to next canvas and data get queried.
    In my find button i have this code.
    procedure XXBANK_GUARANTEE_FIND_DATA is
    cursor c_query_find_details
    is
    select Distinct C_PROJECT_ID,C_PO_NUMBER,C_BG_TYPE,C_SUPPLIER_NAME,C_SUPPLIER_SITE_NAME,
    C_GUARANTEE_NUMBER,C_EXPIRY_DATE,C_AMOUNT,C_CURRENCY_CODE,
    C_FUNCTIONAL_AMOUNT,C_STATUS,C_BANK_NAME,C_BANK_BRANCH_NAME,C_GUAR_ISSUE_DATE,
    C_RECEIVED_DATE,C_CONVERSION_TYPE,C_CONVERSION_DATE,C_EXCHANGE_RATE,
    C_APPROVAL_DATE,C_APPROVAL_STATUS,C_REVISION_NUMBER,C_ORIGINAL_RECEIVED,
    C_ORIGINAL_RET_TO_PARTY,C_REMARKS from XXBGS_BANK_GUARANTEE_MASTER
    where (C_PO_NUMBER= :QUERY_FIND_BLK.C_PO_NUMBER or :QUERY_FIND_BLK.C_PO_NUMBER is null)
    and (C_PROJECT_ID=:QUERY_FIND_BLK.C_PROJECT_NAME or :QUERY_FIND_BLK.C_PROJECT_NAME is null)
    and (C_SUPPLIER_NAME= :QUERY_FIND_BLK.C_SUPPLIER_NAME or :QUERY_FIND_BLK.C_SUPPLIER_NAME is null)
    and (C_SUPPLIER_SITE_NAME= :QUERY_FIND_BLK.C_SUPPLIER_SITE or :QUERY_FIND_BLK.C_SUPPLIER_SITE is null)
    and (C_GUARANTEE_NUMBER= :QUERY_FIND_BLK.C_GUARANTEE_NO or:QUERY_FIND_BLK.C_GUARANTEE_NO is null)
    and (C_BG_TYPE= :QUERY_FIND_BLK.C_GUARANTEE_TYPE or :QUERY_FIND_BLK.C_GUARANTEE_TYPE is null)
    and (C_GUAR_ISSUE_DATE= :QUERY_FIND_BLK.C_FROM_DATE or :QUERY_FIND_BLK.C_FROM_DATE is null)
    and (C_RECEIVED_DATE= :QUERY_FIND_BLK.C_TO_DATE or :QUERY_FIND_BLK.C_TO_DATE is null);
    begin
    go_block('BANK_GUARANTEE_BLK');
    CLEAR_BLOCK (no_validate);
    for c_query_find_details_rec in c_query_find_details
    loop
    :BANK_GUARANTEE_BLK.C_PROJECT := c_query_find_details_rec.C_PROJECT_ID;
    :BANK_GUARANTEE_BLK.C_PO_NUMBER := c_query_find_details_rec.C_PO_NUMBER;
    :BANK_GUARANTEE_BLK.C_BG_TYPE := c_query_find_details_rec.C_BG_TYPE;
    :BANK_GUARANTEE_BLK.C_SUPPLIER_NAME := c_query_find_details_rec.C_SUPPLIER_NAME;
    :BANK_GUARANTEE_BLK.C_SUPPLIER_SITE_NAME := c_query_find_details_rec.C_SUPPLIER_SITE_NAME;
    :BANK_GUARANTEE_BLK.C_GUARANTEE_NO := c_query_find_details_rec.C_GUARANTEE_NUMBER;
    :BANK_GUARANTEE_BLK.C_EXPIRY_DATE := c_query_find_details_rec.C_EXPIRY_DATE;
    :BANK_GUARANTEE_BLK.C_AMOUNT := c_query_find_details_rec.C_AMOUNT;
    :BANK_GUARANTEE_BLK.C_CURRENCY_CODE := c_query_find_details_rec.C_CURRENCY_CODE;
    :BANK_GUARANTEE_BLK.C_FUNCTIONAL_AMOUNT := c_query_find_details_rec.C_FUNCTIONAL_AMOUNT;
    :BANK_GUARANTEE_BLK.C_STATUS := c_query_find_details_rec.C_STATUS;
    :BANK_GUARANTEE_BLK.C_BANK_NAME := c_query_find_details_rec.C_BANK_NAME;
    :BANK_GUARANTEE_BLK.C_BANK_BRANCH_NAME := c_query_find_details_rec.C_BANK_BRANCH_NAME;
    :BANK_GUARANTEE_BLK.C_ISSUE_DATE := c_query_find_details_rec.C_GUAR_ISSUE_DATE;
    :BANK_GUARANTEE_BLK.C_RECEIVED_DATE := c_query_find_details_rec.C_RECEIVED_DATE;
    :BANK_GUARANTEE_BLK.C_CONVERSION_TYPE := c_query_find_details_rec.C_CONVERSION_TYPE;
    :BANK_GUARANTEE_BLK.C_CONVERSION_DATE := c_query_find_details_rec.C_CONVERSION_DATE;
    :BANK_GUARANTEE_BLK.C_EXCHANGE_RATE := c_query_find_details_rec.C_EXCHANGE_RATE;
    :BANK_GUARANTEE_BLK.C_APPROVED_DATE := c_query_find_details_rec.C_APPROVAL_DATE;
    :BANK_GUARANTEE_BLK.C_APPROVED_STATUS := c_query_find_details_rec.C_APPROVAL_STATUS;
    :BANK_GUARANTEE_BLK.C_REVISION_NUMBER := c_query_find_details_rec.C_REVISION_NUMBER;
    :BANK_GUARANTEE_BLK.C_ORIGINALRECEIVED := c_query_find_details_rec.C_ORIGINAL_RECEIVED;
    :BANK_GUARANTEE_BLK.C_ORIGINALRETURNEDTOPARTY := c_query_find_details_rec.C_ORIGINAL_RET_TO_PARTY;
    :BANK_GUARANTEE_BLK.C_REMARK:= c_query_find_details_rec.C_REMARKS;
    NEXT_RECORD;
    end loop;
    FIRST_RECORD;
    Exception
         when too_many_rows then
         null;
         when others then
         null;
    end XXBANK_GUARANTEE_FIND_DATA;
    Any help is appricatable.
    Regards
    Srikkanth

    Why are you manually populating your block? Since your are only querying the XXBGS_BANK_GUARANTEE_MASTER table, why not base your BANK_GUARANTEE_BLK on this table and use your :QUERY_FIND_BLK as the source for modifying the DEFAULT_WHERE clause of the BANK_GUARANTEE_BLK block. Then you don't have to do all of the "OR" clauses in your WHERE clause; which is where your problem is. :) Then you just need to test for which items in your QUERY_FIND_BLK are not null and add these to the DEFAULT_WHERE clause programatically. For example:
    DECLARE
      v_def_where   VARCHAR2(2000);
    BEGIN
      IF ( :QUERY_FIND_BLK.C_PROJECT_NAME IS NOT NULL ) THEN
        v_def_where := v_def_where||' C_PROJECT_ID = '||:QUERY_FIND_BLK.C_PROJECT_NAME ;
      END IF;
      IF ( :QUERY_FIND_BLK.C_PROJECT_NAME IS NOT NULL ) THEN
        v_def_where := v_def_where||' C_PROJECT_NAME  = '||:QUERY_FIND_BLK.C_PROJECT_NAME ;
      END IF;
      etc....
      Go_Block('BANK_GUARANTEE_BLK');
      Execute_Query;
    END;If you absolutely must manually populate your block, then I suggest you copy your query into SQL Developer/Toad/your favorite SQL Tool and refine your SQL Statement so that it returns a single record for a PO Number.
    Craig...

  • How to create  a  login screen

    i need to create a login screen ,only if user enter valid
    username & password it should move to next canvas.
    could any one help me out

    there are many ways.
    if you want the users to be backend users i.e. schema users u candesign a fform with on logon triggers.
    instaed you can have front end users by storing user aname and password in a table , and check for valid user name and passowrd using a form.

  • Removing Contacts from Multiple Campaign Canvases

    Hi everyone,
    We're dealing with an issue on managing the flow of contacts in our automated campaigns.  We currently have 3 automated email drips that are based on the content that prospects engaged with to initially enter our database.  Then, contacts flow into the next canvas based on internal prioritization of the tracks.  However, we also run a new thematic campaign every quarter that has fresh content and pulls contacts out of our automated programs based on Title, Engagement, Industry, etc. 
    The problem is that every time we launch a new thematic campaign, we're forced to go back into our automated drip programs and add shared filters based on the new campaign's criteria before each email step.
    My idea is to have the newly segmented contacts enter a program that checks what other campaign canvases they are in and then remove them.  This would solve our issue of having contacts in multiple campaigns at the same instance, which would allow us to easily transfer newly engaged contacts into our quarterly thematic campaign.
    Am I thinking about this in the correct way?  Can you remove contacts from specific canvases in Program Builder?
    Thanks,
    Parker

    Need more info...what application/applications are you presently syncing contacts with? OS on your computer? Are you syncing contacts over the air? Are your contacts correct on your computer?

  • Getting Assertion Failed Message..(Experts urjent help plz)

    Hi all
    We are migrating 4.5 forms to 10g.
    In one of the 10g converted form, i have a push button calling another form which is not available.(i dont have any other code, just a call_form)
    say,
    call_form('abcd.fmx');
    when i run the form and click the push button once, am getting the error message "cannot read form abcd.fmx", but if i click the button again am getting the following error and the form hangs.
    Microsoft Visual c++ Runtime Library
    Assertion failed.
    Program c:\devsuitehome\bin\ifweb90.exe
    File: E:\f9iw32\src\ix\ixfs.c
    Line:67
    ..and some other info.
    Guys..its very urjent, am unable to proceed now. plz throw some light on it.
    Thnx in advance.
    Sriram

    Hi thanx for the reply,
    Am running the form standalone in my windows desktop.
    I have also tried the form name without .fmx extension and still am getting the same error.
    Actually i have narrowed down the issue now.
    Issue:
    If i have a call_form in 2nd window(i.e not in first window) then if i click that call_form button twice, i will get the error that i told above.
    My form version is:
    Forms [32 Bit] Version 9.0.4.0.19 (Production)
    My test form has canvas1 and canvas2 assigned to window1 and window2 respectively.
    I have a block with one textitem and one button having code call_form('xyz.fmx');
    textitem is in canvas1 and button in cavas2.Now when i run the form, i will get canvas1 with text item displayed, if i click tab, i will go to the next canvas where i have call_form button.Now i press button once, i get error message"cannot read..", now i press it again and i get the "Assertion Failed...."
    I hope it is clear.
    Thanx again
    Sriram

  • Tabbing (Next Navigation Item) to different frames/datasets on a canvas?

    How can I set the tab order to tab between frames on my form? In the properties palette for an item, the Next Navigation Item field, I can only choose items in the same dataset. What if I wanted to mix and match the fields from say 2 different datasets so they show up together in a frame and have consistent tabbing?
    Also, I have set up a join relationship between 2 datasets on a canvas but when I insert record it only inserts 1 set and not the info from the other but when I query info that was already in the dataset it shows up fine on both sets??? Please help. Thanks alot

    To achieve cross-block navigation, here is what I do:
    For forward tabbing as well as automatic skipping to same field, create a hidden navigable item following the item, and on that item, create a when-new-item-instance trigger with a go_item command. (For hidden navigable, it must be on the same canvas. Just set its height and width to zero.)
    For shift-tab (reverse navigation), use a key-prev-item trigger on the second item with a go_item back to the first item.

  • Mouse clicks on shapes drawn on canvas

    I'm having some trouble adding a mouseListener to a shape I've drawn on a canvas.
    I'm drawing a circle using g.drawOval() and then filling it in with the g.fillOval().
    The thing is I want the circle to be sensitive to mouse clicks on it, I'm trying to write the classic dots and boxes game, so I can draw a line from it to the
    next circle (dot) clicked.
    Unfortunately, the circle is not picking up on the mouseClicked event, I'm pretty sure my dotActions class works because I used it on another class which extends JLabel and it works fine, that is when the label is clicked the program exits, but when I add it to the Dots class it doesn't pick up on any mouse events.
    Here is my code, any help would be appreciated, thanks.
    public class Dots extends Canvas {
    public Dots(gameBoard gb, Graphics g, int x, int y, int hspace, int vspace){
    g.drawOval(x, y, 10, 10);
    g.fillOval(x, y, 10, 10);
    dotActions da = new dotActions(this);
    addMouseListener(da);
    public class dotActions implements MouseListener{
    public void mouseClicked(MouseEvent e){
    //this is a test to see if the mouse event is picked up
    System.exit(0);
    public void mouseEntered(MouseEvent e)
    public void mouseExited(MouseEvent e)
    public void mousePressed(MouseEvent e)
    public void mouseReleased(MouseEvent e)
    }

    Create a shape and add the listener to that as well as drawing to the screen.
    Or what I did was to save all the shapes and then test the mouse point to see if current mouse point was inside any. In my case I am using it to provide context sensitive help
    MArk
    * handle context sensitive tooltips - replaces default java
    * routine with our own which is context sensitive
    public String getToolTipText(MouseEvent e)
    Point raw_p = e.getPoint();
    //convert to our co-ords
    Point p = new Point(screenToScaledCoordsX((int) raw_p.getX()),
    screenToScaledCoordsY((int) raw_p.getY()));
    String tip = null;
    //check any tooltips to see if match found
    if (number_of_tooltips > 0)
    //check each object and get master tooltip text if inside rectangle if on
    //same page - go through all as text objects added before titles which will then be picked up
    for (int i = 0; i < number_of_tooltips; i++)
    if ((tool_tip_page[i] == last_page_id) &&
    (tool_tip_rectangle.contains(p)))
    tip = tool_tip_text[i];
    //return default or ours
    return tip;

  • How can I have three videos playing simultaneously on one canvas in Final Cut Pro 7.0

    I am doing a project for my degree show and i want to put 3 .mov files horizontally stacked next to each other at a 90degree angle (see picture) How do i do this? (this IS the right way up) when show the TV will be put on its side.
    If anyone has any input for this I'd be really grateful
    Sam.

    Put the clips in the timeline stacked on top of each. Switch the canvas to Image+Wireframe in the view popup on the top right. Grab the corner of the image and drag to scale it. Grab the edge of the image and drag to rotate. Open the clip into the viewer and set the rotation so it's exact.

  • How can you find out an individual image size from multiple images on a canvas

    This is probably a really really simple question but I can't for the life of me find how I can find out an individual image size from multiple images on a canvas. eg I have 3 photos i want to arrange 1 large and the other two next to it half the size. How can I edit individual image size on the canvas as when I select the image on a sperate layer I want to resize it just resizes the entire canvas and not the individual image
    Thanks

    I want to know they exact dimensions though. You can get them by dragging to the 0,0 corner and then reading off of the ruler scale on the sides but its fiddily as you have to zoom right in and work it out. I know in photoshop there is a ruler but is there any other way in Elements?

  • Having a problem saving the graphics on a canvas.

    I'm having a problem saving graphics on a canvas. It draws on the canvas but when another window comes up the graphics disappear. I put in a method to take the graphics on the canvas and repaint it with the graphics. But this comes up blank. So I don't know why this is happening. It is probably the paint method but I don't know why. If anyone has any ideas could you please respond because I have had this problem for ages now and it's driving me mad and I have to get this finished or I'm going to be a lot of trouble. I'll show you the code for the class I am concerned with. It is long but most of it can be disregarded. The only parts which are relevent are the paint method and where the drawline e.t.c are called which is in the mouse release
    package com.project.CSSE4;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.ImageFilter;
    import java.awt.image.CropImageFilter;
    import java.awt.image.FilteredImageSource;
    import java.io.*;
    import java.util.*;
    import java.net.*;
    import javax.swing.*;
    import java.sql.*;
    public class CanvasOnly extends JPanel
           implements MouseListener, MouseMotionListener
       public static final int line = 1;
       public static final int freehand = 2;
       public static final int text = 3;
       public static final int mode_paint = 0;
       public static final int mode_xor = 1;
       public Color drawColor;
       public int drawThickness = 1;
       public int drawType = 0;
       public boolean fill = false;
       private boolean dragging = false;
       public int oldx = 0;
       public int oldy = 0;
       private int rectangleWidth;
       private int rectangleHeight;
       private tempLine draftLine;
       private tempText draftText;
       public Canvas pad;
       public static final Font defaultFont =
         new Font("Helvetica", Font.BOLD, 14);
       protected boolean floatingText = false;
       boolean showingPicture;
       protected Image offScreen;
       public JTextArea coor;
       public JButton writeIn;
       Connection connection;
       String codeLine;
       int x = 0;
       int y = 0;
       public CanvasOnly()
           try
                Class.forName("com.mysql.jdbc.Driver").newInstance();
           }catch( Exception e)
                 System.err.println("Unable to find and load driver");
                 System.exit(1);
            pad = new Canvas();
            pad.setBackground(Color.white);
            pad.setVisible(true);
            pad.setSize(400, 400);
           coor = new JTextArea(15, 15);
           writeIn = new JButton("load TExt");
           writeIn.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent event1)
                     try
                   Statement statement = connection.createStatement();
                   ResultSet rs = statement.executeQuery("SELECT * FROM submit WHERE file_name = 'cmd.java'");
                   rs.next();
                   String one1 = rs.getString("student_id");
                   //System.out.println("one1 :" + one1);
                   String two1 = rs.getString("file_name");
                   //System.out.println("two1 : " + two1);
                    InputStream textStream = rs.getAsciiStream("file");
                    BufferedReader textReader = new BufferedReader(
                                     new InputStreamReader(textStream));
                    codeLine = textReader.readLine();
                    x = 0;
                    y = -12;
                    while(codeLine != null)
                        y = y + 12;
                        //fileText.append( line + "\n");
                        //canvasPad.drawTheString(line, x, y);
                        drawText(Color.black, x, y, codeLine, mode_paint);
                        codeLine = textReader.readLine();
                     textReader.close();
                    pad.setSize(400, y);
                    Timestamp three1 = rs.getTimestamp("ts");
                    //System.out.println(three1);
                    textReader.close();
                    rs.close();
              }catch (SQLException e)
                System.err.println(e);
              catch(IOException ioX)
                System.err.println(ioX);
            //setSize(300,300);
            drawColor = Color.black;
            pad.addMouseListener(this);
         pad.addMouseMotionListener(this);
         offScreen = null;
       public Image getContents()
         // Returns the contents of the canvas as an Image.  Only returns
         // the portion which is actually showing on the screen
         // If the thing showing on the canvas is a picture, just send back
         // the picture
         if (showingPicture)
             return (offScreen);
         ImageFilter filter =
             new CropImageFilter(0, 0, getWidth(), getHeight());
         Image newImage =
             createImage(new FilteredImageSource(offScreen.getSource(),
                                  filter));
         return(newImage);
        public void setImage(Image theImage)
         // Fit it to the canvas
         offScreen = theImage;
         repaint();
         showingPicture = true;
        synchronized public void paint(Graphics g)
         int width = 0;
         int height = 0;
         //The images are stored on an off screen buffer.
            //offScreen is the image declared at top
         if (offScreen != null)
                  //intislise the widt and heigth depending on if showingpicture is true
              if (!showingPicture)
                       width = offScreen.getWidth(this);
                       height = offScreen.getHeight(this);
                   //width = getWidth(this);
                   //height = getHeight(this);  //offScreen
              else
                   //width = pad.getSize().width;
                   //height = getSize().height;
                   width = pad.getWidth();
                   //width = getSize().width;
                   height = pad.getHeight();
                   //height = getSize().height;
                    //Draws as much of the specified image as has already
                    //been scaled to fit inside the specified rectangle
                    //The "this" is An asynchronous update interface for receiving
                    //notifications about Image information as the Image is constructed
    //This is causing problems
              g.drawImage(offScreen, 0, 0, width, height, pad);
              g.dispose();
         //clear the canvas with this method
        synchronized public void clear()
         // The maximum size of the usable drawing canvas, for now, will be
         // 1024x768
         offScreen = createImage(1024, 768);
         //Creates an off-screen drawable image to be used for double buffering
         pad.setBackground(Color.white);
         //Set the showingPicture to false for paint method
         showingPicture = false;
         repaint();
         synchronized public void drawLine(Color color, int startx, int starty,
                              int endx, int endy, int thickness,
                              int mode)
         int dx, dy;
         Graphics g1 = pad.getGraphics();
         Graphics g2;
         //if image is not intialised to null
         //the getGraphics is used for freehand drawing
         //Image.getGraphics() is often used for double buffering by rendering
            //into an offscreen buffer.
         if (offScreen != null)
             g2 = offScreen.getGraphics();
         else
             g2 = g1;
            //mode is put into the method and XOR is final and equal to 1
         if (mode == this.mode_xor)
                  //calls the setXOR mode for g1 and g2
                  //Sets the paint mode of this graphics context to alternate
                    //between this graphics context's current color and the
                    //new specified color.
              g1.setXORMode(Color.white);//This will
              g2.setXORMode(Color.white);
         else
                  //Sets this graphics context's current color to the
                    //specified color
              g1.setColor(color);
              g2.setColor(color);
         if (endx > startx)
             dx = (endx - startx);
         else
             dx = (startx - endx);
         if (endy > starty)
             dy = (endy - starty);
         else
             dy = (starty - endy);
         if (dx >= dy)
              starty -= (thickness / 2);
              endy -= (thickness / 2);
         else
              startx -= (thickness / 2);
              endx -= (thickness / 2);
         for (int count = 0; count < thickness; count ++)
              g1.drawLine(startx, starty, endx, endy);
              g2.drawLine(startx, starty, endx, endy);
              if (dx >= dy)
                  { starty++; endy++; }
              else
                  { startx++; endx++; }
            //Disposes of this graphics context and releases any system
            //resources that it is using.
         g1.dispose();
         g2.dispose();
         //This method is not causing trouble
         synchronized public void drawText(Color color, int x, int y,
                String text, int mode)
         Graphics g1 = pad.getGraphics();
         Graphics g2;
         if (offScreen != null)
             g2 = offScreen.getGraphics();
         else
             g2 = g1;
         if (mode == this.mode_xor)
              g1.setXORMode(Color.white);
              g2.setXORMode(Color.white);
         else
              g1.setColor(color);
              g2.setColor(color);
         g1.setFont(new Font("Times Roman", Font.PLAIN, 10));
         g2.setFont(new Font("Times Roman", Font.PLAIN, 10));
         g1.drawString(text, x, y);
         g2.drawString(text, x, y);
         g1.dispose();
         g2.dispose();
          //connect to database
      public void connectToDB()
        try
           connection = DriverManager.getConnection(
           "jdbc:mysql://localhost/submissions?user=root&password=football");
                     //may have to load in a username and password
                                                     //code "?user=spider&password=spider"
        }catch(SQLException connectException)
           System.out.println("Unable to connect to db");
           System.exit(1);
      //use this method to instatiate connectToDB method
      public void init()
           connectToDB();
        protected void floatText(String text)
         draftText = new tempText(this.drawColor,
                            this.oldx,
                            this.oldy,
                                        text);
         this.floatingText = true;
        //nothing happens when the mouse is clicked
        public void mouseClicked(MouseEvent e)
        //When the mouse cursor enters the canvas make it the two
        //straigth lines type
        public void mouseEntered(MouseEvent e)
         pad.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
        //When mouse exits canvas set to default type
        public void mouseExited(MouseEvent E)
         pad.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
        //used for creating the shapes and positioning thetext
        public void mousePressed(MouseEvent e)
             // Save the coordinates of the mouse being pressed
         oldx = e.getX();
         oldy = e.getY();
         // If we are doing lines, rectangles, or ovals, we will show
         // draft lines to suggest the final shape of the object
         //Draw type is a publc int which can be changed
         if (drawType == this.line)
            draftLine = new tempLine(drawColor, oldx, oldy, oldx,
                                 oldy, drawThickness);
            // Set the draw mode to XOR and draw it.
            drawLine(draftLine.color, draftLine.startx,
            draftLine.starty, draftLine.endx,
            draftLine.endy, drawThickness, this.mode_xor);
        //mouse listener for when the mouse button is released
        public void mouseReleased(MouseEvent e)
             if (drawType == this.line)
              // Erase the draft line
              drawLine(draftLine.color, draftLine.startx, draftLine.starty,
                    draftLine.endx, draftLine.endy, drawThickness,
                    this.mode_xor);
              // Add the real line to the canvas
              //When the imput changes to "mode_paint" it is drawen
              //on the canvas
              drawLine(drawColor, oldx, oldy, e.getX(), e.getY(),
                    drawThickness, this.mode_paint);
              dragging = false;
         else if (drawType == this.text)
              if (floatingText)
                   // The user wants to place the text (s)he created.
                   // Erase the old draft text
                   drawText(drawColor, draftText.x, draftText.y,
                                            draftText.text, this.mode_xor);
                       String str = Integer.toString(e.getX());
                       String str1  = Integer.toString(e.getY());
                       coor.append(str + " " + str1 + "\n");
                   // Set the new coordinates
                   draftText.x = e.getX();
                   draftText.y = e.getY();
                   // Draw the permanent text
                   drawText(drawColor, draftText.x, draftText.y,
                         draftText.text, this.mode_paint);
                   floatingText = false;
         public void mouseDragged(MouseEvent e)
            if (drawType == this.freehand)
              drawLine(drawColor, oldx, oldy, e.getX(), e.getY(),
                    drawThickness, this.mode_paint);
              oldx = e.getX();
              oldy = e.getY();
         else
             dragging = true;
         if (drawType == this.line)
            // Erase the old draft line
            drawLine(draftLine.color, draftLine.startx, draftLine.starty,
              draftLine.endx, draftLine.endy, drawThickness,
              this.mode_xor);
            // Draw the new draft line
            draftLine.endx = e.getX();
            draftLine.endy = e.getY();
            drawLine(draftLine.color, draftLine.startx, draftLine.starty,
              draftLine.endx, draftLine.endy, drawThickness,
              this.mode_xor);
         public void mouseMoved(MouseEvent e)
             if (floatingText)
              // When the user has entered some text to place on the
              // canvas, it remains sticky with the cursor until another
              // click is entered to place it.
              // Erase the old draft text
              drawText(drawColor, draftText.x, draftText.y,
                                draftText.text, this.mode_xor);
              // Set the new coordinates
              draftText.x = e.getX();
              draftText.y = e.getY();
              // Draw the new floating text
              drawText(drawColor, draftText.x, draftText.y,
                        draftText.text, this.mode_xor);
         //declare  a class for the line shown before the is as wanted
        class tempLine
         public Color color;
         public int startx;
         public int starty;
         public int endx;
         public int endy;
         public int thickness;
         public tempLine(Color mycolor, int mystartx, int mystarty,
                      int myendx, int myendy, int mythickness)
             color = mycolor;
             startx = mystartx;
             starty = mystarty;
             endx = myendx;
             endy = myendy;
             thickness = mythickness;
        class tempText
         public Color color;
         public int x;
         public int y;
         public String text;
         public tempText(Color mycolor, int myx, int myy, String mytext)
             color = mycolor;
             x = myx;
             y = myy;
             text = mytext;
    }

    http://www.java2s.com/ExampleCode/2D-Graphics/DemonstratingUseoftheImageIOLibrary.htm

  • Issue facing while opening a Canvas application in Webstart

    Hi experts,
    Need a help on the issue: issue was like this:
    I have created a Canvas application in Swings. And It was running fine. The next day i have compiled again the code and build the class and after jar. Deployed in Tomcat.
    Started the webstart and launched the application. Now If I am opening the Canvas which I have required it is giving a error called " Identifier Not found".
    For this issue i tried in these ways: I kept the S.O.Ps in the initialize() method and the respective methods like extractConfigurationParameters(), jbInit().
    But once the control reach to jbInit() it is not continuing.. Even i can see the S.O.P first control in the java console.
    Please help me to fix it.
    With Thanks
    Kishore

    always check in this way - your number of column count for the Jtable, tableInit(), and tableColumnconntent(). these will load at the time of convas initialisation.
    Nicky :-)

  • Top 15 Issues/Fixes Needed in the next Premiere Pro release/update (CS6.5 or CS7)

    I’m excited for what’s coming next in Premiere Pro CS6.5 or CS7 (whichever update is next). As a former FCP7 user myself, Premiere CS6 was a quick and necessary switch (especially after changing the main keyboard shortcuts back to what I was used to). I’ve since gone back to FCP7 on occasion for certain things and I can tell you that I’m so glad I’ve switched. For all the headaches and serious errors that I still get daily/weekly with Premiere Pro CS6, it’s still definitely a big step up. I'm encouraged by staff members like Mitch W. that have expressed confidence that many of these issues will be resolved in the next release. Here is my personal list of “Top 15 issues/fixes” needed in the current Premiere Pro CS6…
    (Adobe STAFF...feel free to print this out and hand it to the engineers responsible for making changes )
    1) The infamous multicam FLAW. Needing no introduction…when you are editing your video in the multicam window and you hit pause or stop Premiere has decided that’s a great time to make a cut on your timeline and also switch angles back to the original angle whether you like it or not. You cannot stop ever while editing multicam without Premiere making these unwanted cuts and angle changes. Awful. Multicam in PPro is otherwise pretty nice, but this issue is terribly counter-productive especially when you are editing longer complex multicam sequences. Imagine if every time you hit pause or stop in the regular timeline it made a cut there and switched clips. Ugh. You get my point.
    2) The audio meters/levels do not work while in the multicam window. A staff member in the forums (I think it was you) said this was a bug. Hope it will get fixed. The audio levels work in every other window and its essential to be able to keep an eye on the levels while editing multicam.
    3) Ticktime.cpp-207 error. Ugh. What a nightmare. I have confidence that it will be fixed soon. Mitch W. from the forums is my new hero for taking on this error. How to replicate it?…simply have 6 (or 7) or more clips with the warp stabilizer effect added on the same timeline as a nested multicam clip and you get this error upon reopening your project. The more warp stabilizers you use, the more times you’ll have to hit “continue” to get through the error before you can open your project or export it to AME. I deal with this every single day because all my projects use these two elements. Most of my projects I have to hit “continue” on the error message upwards of 350-450 times to open my projects. Gets old fast.
    4) Icon View order control. When you display all your clips in icon view instead of a list view (In the project window), there is no metadata to allow you to put the clips in order somehow (or at least maintain the order that you have in the list). There are roundabout workarounds, but c’mon.
    5) Warp Stabilizer fixes…it is an AMAZING tool (far, far, far better than smoothcam in FCP7) BUT…it has it’s issues. Since I use hundreds of times/week (no exaggeration) I know it’s functions/flaws really well. The issues with Warp Stabilizer:
    a) #3 above
    b) Toggle OFF the effect after it’s applied and then hit Analyze again and PPro crashes. (easy to avoid but annoying bug)
    c) If a clip is in the middle of stabilizing (not just analyzing…but the final step labeled “analyzing”) when Auto-save comes up…most of the time PPro freezes and crashes.
    d) The DEFAULT “method” (in the settings for Warp Stabilizer) should NOT be “Subspace Warp”…it should be “Position, Scale, Rotation”. Why? It’s FAAAAARRRR better and more efficient. 95 out of 100 times it causes MUCH less “wobble” in the final stabilized clips AND most importantly 95 out of 100 times it scales the video less. Way better method.
    6) The ability to open multiple projects simultaneously. As simple as FCP7 had it…or even better…as cool and efficient as FCPX does it would be nice.
    7) The ability to mark a clip and not just a point on a timeline (because if you move the clip, the marker doesn’t go with it). I know you can use “Clip Marker” but it's very limiting, can't be moved, can't add notes, can't advance to the next marker (as far as I know). Also a marker list like FCPX has would be nice so you can see your markers all in a list at a glance and adjust them as needed.
    8) Ability to select a clip in the Project window and find out where it’s used in the timeline. I LOVE how you can do the reverse and take a clip in the timeline and “Reveal in Project Window” but it would really help to go the other way around. Dealing with several hundred clips for every project I’ve missed this feature from time to time (FCPX handles this really well).
    9) Add a through-edit indicator in timeline and “re-join clips” option. If you cut a clip but keep both clips together it’s just one continuous clip. But I really hope Premiere adds the not only an indicator of some sort (like FCP7′s way of having two small red triangles facing each other on that cut) so you know it’s one continuous clip BUT ALSO the ability to right-click and “re-join” the two clips into one.
    10) When clip is double-clicked in timeline, CTI position in source viewer should match location in timeline. This one is pretty annoying and a fix would be incredibly helpful. The way it is now is very counter-productive. Definitely hope this gets fixed ASAP.
    11) Better border controls for images/videos. Can’t do much with images right now in PPro. At least allow to customize the color and size/strength of it’s borders and shadows.
    12) Better support for Mac/Apple's top end computers/GPU's. I'm still surprised that 2011 top of the line iMac cards (AMD 6970M) that have 2gb of ram are not supported. I’m sure/I hope 2012 iMac’s will be supported with their new Nvidia GPU’s…but I’ll hold out hope that the top iMac (up until 3 months ago) is supported at least at it’s full power. All around better Mac support would be great considering the wave of new users coming over from FCP.
    13) Opacity/Transparency issues with EXPORTED videos with Cross Dissolves, etc. For some odd reason videos exported from Premiere CS6 have issues with cross dissolves or minor transparency. I’ll try to explain…in the program window of PPro CS6 cross dissolves look fine. Also, if you take a clip and stack it on top of another clip and put the top clip at say 99% opacity instead of 100 it looks like it should in PPro. But, if you export the clips you’ll quickly see that there are issues. It’s almost like the exported videos dissolve from 5 to 95. They skip the subtle beginning (0-5%) and subtle end (95-100%) of any fade. A clip in PPro as described above that is on top of another but set at 99% will look more like 90-95% in the exported file ESPECIALLY if the two clips are contrasting (eg. top layer dark, bottom layer with bright elements). It’s like the opposit of ease-in/ease-out. I have to ease-in/ease-out of every dissolve to avoid this issue…and even then, it’s not THAT much of an “ease” as one would hope. Another user in a forum once posted a video that shows how abruptly exported videos end their transparency changes…see: THIS SAMPLE VIDEO  Perhaps this is a GPU/processing issue with AME vs. Premiere Pro but whatever it is, it should be fixed so videos you export look like the videos you edited!
    14) Better control in Creative Cloud over which devices are “activated/deactivated”  We have 3 computers and it would be nice if one could log in to their Creative Cloud account and see a list of which devices they have and just toggle on/off which one’s are activated/deactivated. This is especially helpful when you are mobile and forget to deactivate one of your two home/office devices so you’re stuck now until you get back to the home/office to deactivate it. This is not a Premiere thing, but just a general wish.
    15) Ability to sync multicam clips automatically using the audio. Plural eyes apparently does this well. Would be nice to have it built into Premiere like FCPX does. Select all the shots you want to sync, One button click, wait a few seconds, done.
    That’s my top 15. Everything else is awesome in my opinion for what I do 10 hours a day 6-7 days a week. I’ve included bug reports/feature requests for all of these at one point but if you are someone else reading this go to the following link and ask for these issues to be fixed: FEATURE REQUEST/BUG REPORT
    I wish Adobe did smaller updates more often. Because even if they were smaller updates, we’d at least know you are working on fixing some of these issues that have plagued this NLE for years. Holding off fixes for one or two big “updates” every year is tough to deal with in a world of the ever updating apps we live and play with daily on our phones. I realize Premiere is a much larger scale and far more professional than a phone app, but hopefully you get my point. Here’s to hoping the next release (NAB 2013?) resolves all my top 15 issues. Here’s to hoping that these issues will be resolved sooner than later so I can stop raising hell in various forums. I’m honestly ready to start praising and defending Premiere Pro instead of griping about it’s bugs and flaws. It’s a fantastic program “on the way” to being the best. I hope.

    Nice list, however it does seem a little bit like you may be hoping that Adobe provides the Final Cut 8 package that Apple never delivered on. Having edited primarily with P-Pro for the last decade, I hope Adobe focuses more on getting the next release to run as smooth as CS5x does, strangling and crucifying all the codec and playback bugs that arose in CS6. To me, it appeared that too many of the changes in CS6 were semantic or cosmetic, meant to give a FCP user more familiarity. Why change the name of an edit function from "overlay" to "overwrite" after 15 years? Because it enhances the product, or because that is what Apple called the function in FCP? If Adobe renames the Program Monitor to the "Canvas" with the next release, I think that I might be sick. There were nice additions to the Creative Suite as a whole, but I hope the next Premiere release reverses some missteps made in CS6, and focuses more on stability and enhanced functionality. I also really hope that they have an open ear towards criticism; Apple did not and their users ended up with FCP-X
    It saddens me that the fixes I want most in a future release were purposeful changes between CS5x and CS6x.
    1) Provide the options for transport controls in the source and program monitors. All of the users at my office hate that the jog and shuttle were removed in CS6. JKL was an option prior to CS6 and if we liked it we would have used it. I keep reading the justification that this change was meant to save space and streamline the UI. I can't express cordially how much this bothers me to look at the empty wasted space in my CS6 UI where the transport controls should be. The experiment has gone on long enough.
    2) Restore the 3 Way Color Corrector to its previous functionality. The 3 way color corrector has been effectively neutered in CS6. Where in CS5x and earlier releases one could separately target the input/output levels of Highlights, Midtones, and Shadows, CS6 has only a master input/output level control. Why is less control better? Is it a 3-Way Color Corrector or a 1-Way Color Corrector?
    3) Restore Clip and Timeline markers to their previous functionality. I don't even.... I can't. A user shouldn't have to do work arounds to create a modicum of functionality. This again was an attribute that wasn't broken in earlier releases.
    4) Simplify the the task of pasting media into a targeted track. As it is now, pasted items will always go to the lowest activated track instead of the targeted track.
    Lastly I would like the Adobe Premiere teams to consider what an amazing accomplishment Premiere CS5x was. Upon CS5's release, a good portion of competitor's workflows became obsolete. CS5.5 refined, stabilized, and expanded functionality.
    CS6 changed the UI around, moving or deleting buttons, changed keyboard shortcuts, and renamed functions. Oh, and added hoverscrub, you know...like FCPX. In exchanged there was loss of functionality, stability issues and broken codecs.
    I really hope the next release is more like CS5x and less like FCPX

  • How to change content/stacked canvases to tab canvas

    Hi,
    I have created a form which has one content canvas and multiple stacked canvases. The content canvas displays the first page and then we hv to click on next to go to the next stacked canvas and so on. I want to try making it in tabs (tab canvas) and then I will decide which one looks better and performs good.
    Can you guys please give me a detailed instruction on how to convert my content and stacked canvases to tab canvases. I have never done tab canvas. I tried one, I changed one of my present stacked canvas to tab but all the fields and texts were gone and there were just two tabs in it.
    Please suggest. Thanks in advance.

    Might get a better response in the Forms forum...
    Forms

  • Forms 6i, Stacked & Tabbed Canvas- Wierd behaviour

    Hi,
    I am having a wierd problem:
    Scenario:
    I have a datablock of 40 columns.
    I put 1 (say col-1 on page_1 and col-21 on page_2) column each on two different TAB pages.
    I created 2 stacked canvases: page_1_stacked & page_2_stacked
    I put col-2 to col-10 on page_1_stacked
    and col-22 to col-40 on page_2_stacked
    I used the following code to show/hide the appropriate cols/stack canvases when the users changes Tab pages:
    [when-tab-page-changed
    if (:system.tab_new_page ='PAGE_1')
         then
         show_view('PAGE_1_STACKED');
         hide_view(''PAGE_2_STACKED'');
    elsif (:system.tab_new_page ='PAGE_2')
         then
         hide_view('PAGE_1_STACKED');
         show_view(''PAGE_2_STACKED'');
    end if;
    Problem:
    Everything seems to work fine, the stacked canvases show/hide as expected, but --->as soon as I put my cursor in any column on TABBED PAGE (here col-1 or col-21), all the stacked canvases vanish
    -->if as a result of above case where I put the cursor in a tabbed-page col and canvas vanished, I navigate to the next field (which is on canvas), the canvas shows up (which is normal)....but then this canvas wont get hidden with my hide view... and end up with all stacked canvases shown together or none at all
    I have played around with all the properties and am really trapped.
    Please help!
    Thanks.

    Devang, are you aware that if you put the cursor focus in a field, Forms will ignore any show_view or hide_view commands if they cause the cursor to disappear? And if your cursor focus is in a field in a stacked view, hide_view will not work. Forms will not let you hide or cover up what ever item is identified by :System.Cursor_Item.
    I do not know why you need Col_1 or col_21 on the tab canvas. Put them on your stacked canvasses, too.
    Use a when-new-item-instance block-level trigger to determine which tab page should be displayed. If :System.trigger_item = col_1 through col_20, make sure Page_1 is displayed, and for col_21 through col_40, make sure Page_2 is displayed.
    Similarly, use a when-tab-page-changed trigger to move the cursor to the correct canvas. You wouldn't even need to use show_view or hide_view, Forms will do that for you each time you move into an item on either canvas.
    And why are you using two canvases anyway? Since you are using a horizontal scrollbar, why not put them all on a single canvas? (And then you wouldn't need the tab pages.)

Maybe you are looking for

  • Why i can't get latest firmware update for n97?

    I can see there is new update for n97 (21.2.045) but update check from phone and pc says i have the latest version. i don;t have latest version. i have september firmware on.

  • The app? How do I open/create a new PDF document using Adope Reader

    How do I use the Adobe Reader app on my android tablet to create a PDF document.  Can the Reader app convert an existing *.docx document to a *.pdf?

  • PS/NVision problem since upgrading to PeopleTool 8.53.13

    We are busy upgrading from PeopleTools 8.49.18 to PeopleTools 8.53.13 on HCM 9.0. Since the upgrade the "Run Report" button on the PS/nVision "Define Report Request" page is missing. I have:- 1) Checked security 2) Run a trace and see the instruction

  • Grouping using cl_salv_hierseq_table

    Dear All, Using the class cl_salv_hierseq_table how can I use grouping like below: Country Customer No. Customer Name Customer No. Part Id                 Part Quantity          Rate Hierachy can be done using Bind (on KUNNR), but how to group them u

  • Casting Arrays

    Is there anything particularly bad with casting Arrays? For convenience, I store some instances of a class in a LinkedList. Now, when I want to get them in a nice Array, I tried this: ("Creature" being a class of mine) Creature[] creatureArray = (Cre