Inconsistent behavior when placing a file in a transformed frame

I've been playing around with the sample plug-in SnippetRunner's SnpPlaceFile::PlaceViaHelper() method to allow it to place a file inside a frame.<br /><br />If a frame is selected, I compute boundsInParentCoords as follows:<br />  InterfacePtr<IGeometry> itemGeometry(selectedItemRef, UseDefaultIID());<br />  boundsInParentCoords = itemGeometry->GetPathBoundingBox();<br />and in the call to layoutHelper.PlaceFileInFrame(), I use the frame's UIDRef (selectedItemRef) as the parentUIDRef but I get the database for the importFileCmdData->Set() method using the active layer UIDRef.<br /><br />This works fine, unless the frame has been transformed before I do the place, in which case it works in some cases and not in others. Specifically, it works for Scale, Rotate, Horizontal Shear, and Horizontal Flip, but it doesn't work (i.e., the image is placed at the wrong location) for Translate, Vertical Shear, and Vertical Flip.<br /><br />Can anyone explain why this works in some cases and not in others? Is there something else I'm suposed to be doing? Or maybe I'm going about this all wrong. In either case, I need help. Thanks.<br /><br />Bob

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class SetAlwaysOnTop {
    private JFrame frame;
    public SetAlwaysOnTop () {
        frame = new JFrame("Set always on top frame");
        JPanel panel = new JPanel(new BorderLayout());
        panel.add(new JLabel ("Top Label"),BorderLayout.NORTH);
        JButton dialogButton = new JButton("Show Dialog");
        dialogButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                createDialog();
        panel.add(dialogButton,BorderLayout.CENTER);
        frame.setContentPane(panel);
        frame.pack();
        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        frame.setVisible(true);
    private void createDialog() {
        final JDialog testDialog = new JDialog(frame,"Modal Frame",true);
        JPanel closePanel = new JPanel(new BorderLayout());
        JButton close = new JButton("Close");
        close.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testDialog.dispose();
        testDialog.setLocation(50,50);
        closePanel.add(close);
        testDialog.setAlwaysOnTop(true);
        testDialog.setContentPane(closePanel);
        testDialog.pack();
        testDialog.setVisible(true);
    public static void main (String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                SetAlwaysOnTop top = new SetAlwaysOnTop();
}

Similar Messages

  • Disappering cursor when placing multiple file in Indesign.

    When placing multiple file (jpeg, tiff's, pdf files,etc.) in a indesign document, my cursor disappears. If you can get to the desktop and click on it, it will come back.
    first started in Indesign CC 2014, Any fix for this?
    Thanks, Dennis

    Hi,
    This is an expected behavior, when you place an image in InDesign then it display the preview of the image however you this has no impact on the output unless the image placed is of low-resolution itself.
    In order to have good resolution of images, you may switch to View > Display Performance > High Quality.
    Thanks,
    Manish Sharma

  • Colour shift when placing PSD files into illustrator

    Hi there
    I have tested this issue on CS 3,4 and 5.
    bascially if I create a CMYK document with a colour image and save this down as a psd file with the coated Fogra 39 embedded in it. If I create a new file within Illustrator with the same colur management and place the psd file into the document and check the link option (so it is a linked file), the colour shifts when using the colour picker. If I print the document from each APP they visually look different as well.
    If I place the psd into illustrator without selecting the link option the colour has the same CMYK values as the psd within Photoshop and also prints correctly.
    i can only assume that there is an option somewhere in regards to the "link" option and how this changes tha colour values somewhere? If not is there anyway I can get around this issue so I can use linked files without the CMYK values changing?
    Thanks in advance
    Paul

    Hi guys
    Thanks for the responses.
    I use bridge to blanket the colour settings so this i feel this is not the issue here. If you have a moment and would kindly create a colour tint within PS of what ever colour, save this down as any format and place this into illustrator with the link checkbox checked you will see the colour data has physically changed for the CMYK values. This results in the prints looking different as well. If you deselct the link check box when placing the file the CMYK values are the same.
    I tried the overprint preview option. This changes the viewable colour on screen but not the CMYK data of the file.
    There seems to be a fundamental floor with this link option for some reason.
    I might have phone Adobe direct for this iisue as I cannot find a fix for this.
    Many thanks
    Paul

  • Indesign pain when placing vector files

    Hi All,
    I need some help!!
    I'm working on a fairly large catalogue where there is 300+ vector files placed into the Indesign document. As I place more I'm finding Indesign just get slower and slower. GRRRR!!!!! Even when I copy and past an image I have to wait. I'm sick of seeing that bloody beach ball.
    I'm running CS5.
    Am I doing something wrong? Is it just a case of Indesign not being able to handle that many .ai files???
    PLEASE HELP. Because it's doing my head in!
    umit.

    Well I'd stop copy and pasting illustrator into inDesign straight away. That can introduce problems. I'm not a fan of that workflow, others are, but I don't recommend it.
    Placing the files is the preferred method
    ==========================================================
    What version of InDesign are you using?
    If it's CS5 or later go to Preferences> Interface and change the Live Screen Drawing to Delayed
    See if that helps
    ==========================================================
    Also go to View>Display settings and choose "Typical".
    ==========================================================
    File size might be causing slowness issues due to overhead in the indesign file.
    Try doing a File>Save As and save it as a new file name.
    ==========================================================
    If that doesn't fix it then I'd try
    File>Export>InDesign Markup Language (IDML)
    When you open that exported file in INdesign it will open as Untitled
    That might speed up the flow
    ==========================================================

  • Maintaining resolutions when placing embedded files

    Hi,
    I am just getting the hang of placing embedded files into my documents and the issue I am having is when I place an embedded psd into another document it seems to shrink it down and lose it's sharpness. Why is this and how do I fix it?
    Thank You!

    If your images are different resolutions they will appear as different sizes. Please post screen captures of your problem.
    Benjamin

  • Color Inconsistency Problem when opening a file designed in InDesign

    I am designing images in Indesign CS. I am using lab color. When I export those files as pdfs (in the color settings I check "leave unchanged") and when I open them up in Photoshop CS in lab color, I use the eyedropper tool to see if my colors are the same. The lab color numbers are all shifted slightly from what they originally were in InDesign. I am using color management in both Photoshop and InDesign with the same profile. Shouldn't my colors stay the same? Why are they changing slightly? It is very important that they be exact.

    Mary,
    I've done two tests:
    1. Open p.3 of this doc in PhS (CS2) in mode Lab:
    http://www.fho-emden.de/~hoffmann/swatch16032005.pdf
    The doc was programmed in Lab by PostScript. PhS shows
    the correctly rounded values (original values under
    each swatch). Occasionally tiny errors like this:
    50.47-->51 .
    2. The same doc p.3 placed in ID, then added a rectangle
    with Lab=50/60/70. Exported as PDF (colors unchanged)
    and opened in PhS: exactly 50/60/70.
    So far everything seems to be correct, but the second
    test concerns only one ID Lab swatch.
    If you send me an example doc with color swatches and
    numbers then I would analyze it (e-mail by clicking
    on my name).
    Clicking on the name doesn't work. Use [email protected]
    I don't have CS, only CS2, if this should matter.
    Best regards --Gernot Hoffmann

  • Getting error when placing jsp file in tomcat root folder

    hello experts,
    i have developed an application on netbeans 6.1 for mail.
    It is working perfect when i run it from netbeans, but when we copy those jsp files to ROOT folder of tomcat5.5 server, it is showing me following error.
    rg.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 14 in the jsp file: /Mailer1.jsp
    Session cannot be resolved to a type
    11: <%!
    12: String nam = null, email = null, suggestion = null;
    13: RequestDispatcher disp = null;
    14: public static Session sess = null;
    15:
    16: %>
    17: <%
    An error occurred at line: 38 in the jsp file: /Mailer1.jsp
    sess cannot be resolved
    35:
    36: //SecurityManager security = System.getSecurityManager();
    37:
    38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
    39: {
    40: protected PasswordAuthentication getPasswordAuthentication()
    41: {
    An error occurred at line: 38 in the jsp file: /Mailer1.jsp
    Session cannot be resolved
    35:
    36: //SecurityManager security = System.getSecurityManager();
    37:
    38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
    39: {
    40: protected PasswordAuthentication getPasswordAuthentication()
    41: {
    An error occurred at line: 38 in the jsp file: /Mailer1.jsp
    javax.mail.Authenticator cannot be resolved to a type
    35:
    36: //SecurityManager security = System.getSecurityManager();
    37:
    38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
    39: {
    40: protected PasswordAuthentication getPasswordAuthentication()
    41: {
    An error occurred at line: 45 in the jsp file: /Mailer1.jsp
    sess cannot be resolved
    42: return new PasswordAuthentication("[email protected]","ratatouille");
    43: }
    44: });
    45: sess.setDebug(true);
    46:
    47:
    48: //sess = Session.getDefaultInstance(props);
    An error occurred at line: 50 in the jsp file: /Mailer1.jsp
    Transport cannot be resolved to a type
    47:
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    An error occurred at line: 50 in the jsp file: /Mailer1.jsp
    sess cannot be resolved
    47:
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    An error occurred at line: 51 in the jsp file: /Mailer1.jsp
    Message cannot be resolved to a type
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    An error occurred at line: 51 in the jsp file: /Mailer1.jsp
    MimeMessage cannot be resolved to a type
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    An error occurred at line: 51 in the jsp file: /Mailer1.jsp
    sess cannot be resolved
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    An error occurred at line: 52 in the jsp file: /Mailer1.jsp
    Message.RecipientType.TO cannot be resolved to a type
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    55: msg.setContent(suggestion, "text/plain");
    An error occurred at line: 52 in the jsp file: /Mailer1.jsp
    InternetAddress cannot be resolved to a type
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    55: msg.setContent(suggestion, "text/plain");
    An error occurred at line: 53 in the jsp file: /Mailer1.jsp
    InternetAddress cannot be resolved to a type
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    55: msg.setContent(suggestion, "text/plain");
    56: trans.connect();
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    i m unable to find out the solution,
    please help me to resolve it.
    thnaks.

    Hi shams.hq,
    I don't understand how you bother to copy an application in your server directories. It's really piece of cake to deploy with Tomcat.
    All you have to do :
    - with Netbeans, you build the project : a WAR file will be created in the dist directory of your project;
    - launch the server, if it's not running;
    - with your web browser, connect to the Tomcat Manager;
    - from there, you may upload and deploy the WAR file of your project.
    Et voilà ! Tomcat will unzip the WAR and install your classes and libraries at the right place.

  • Formating fonts when placing excel files.

    I need some help. I am creating a catalouge for my business and we use a "proprietary font". We are using an excel spread sheet to link our data to the ID file, as our prices change a couple of times a year and I don't want to keep having to change the cataloge one line at a time. When I place the excel file and change the font and do the set up all is good. It is only when I change a price in the excel file and update the ID (cs5) file that ID changes my font to Times New Roman. Is there a way to have ID keep the font formating so I don't have to change the font everything every time I update the excel file?
    Thanks
    David

    Thanks Bob.. I knew someone would know this. Though I felt silly asking the question in the first place. I do love forums.
    David

  • Mail 6.0 bug when placing EPS file

    When composing an email, I've always dragged .EPS files into the compose message window, and had the window render a preview of the .EPS file.
    Since upgrading to Mountain Lion, the file doesn't preview, and the window freezes. I'm unable to continue typing or edit type.
    The present workaround I've discovered is to Close (Command-W) the window, choose "Save", and then open up the saved composition from the Drafts folder. The .EPS then previews as expected, and the email can be further edited and sent.
    Another bug I'm experiencing is the lost ability to drag image files out of received emails onto the desktop or Finder windows. I'm having to use the Save drop-down option to save out attached files.
    Is anyone else experiencing these bugs, or know of a proper fix? I really hope Apple addresses this with a patch soon...

    I am having the same problem, both with attaching .eps files and drag and dropping. Both things worked fine with Lion but not with Mountain Lion.
    I called Abobe as it happens with Illustrator files and they say it is an Apple thing. The senior tech at Apple I spoke to for over and hour didn't know why it was happening.
    I am also having trouble with pdf files looking black in the open preview and looking black when attached to emails. If I drag them to my desktop and open them they display full color, however mailing them looking black to a client is not an option.

  • How to get poster image (from_movie) when placing SWF file with JS?

    I am able to place the poster from movie (flv) file. SWF files seems to belong to Movie class. I can place the generic posters (standard, none and proxy_image), but not "FROM_MOVIE".
    I am getting the following error message:
    "Error 81926" "The poster image could not be changed to the requested image".
    I will attach my code (sligtly modified from the sample "placeMOVIE" which is coming with CS5) containing also code for other property settings to be tested.
    Hoping to find a good solution for this, thanks in advance!
    Erkki
    /PlaceMovie.jsx
    //An InDesign CS5 JavaScript
    //Shows how to import a movie  file.
    main();
    function main(){
        mySetup();
        mySnippet();
        myTeardown();
    function mySetup(){
        var myDocument = app.documents.add();
        myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
        myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
        myDocument.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin;
    function mySnippet(){
        var myDocument = app.documents.item(0);
        var myPage = myDocument.pages.item(0);
        //<fragment>
        //Given a page "myPage"...
        var myFrame1 = myPage.rectangles.add({geometricBounds:[72, 72, 288, 288]});
        //Import a movie file (you'll have to provide a valid file path on your system);
        var myMovie = myFrame1.place(File("~/Desktop/SWFsivut/a1.flv"))[0];
        //alert("myMovie.name: " + myMovie.name)
        //alert("myMovie.visibleBounds: " + myMovie.visibleBounds)
        var mySWF_bounds = myMovie.visibleBounds;
        myFrame1.remove();
        var myFrame2 = myPage.rectangles.add({geometricBounds:mySWF_bounds});
        var myMovie2 = myFrame2.place(File("~/Desktop/SWFsivut/01.swf"))[0];
        //alert("myMovie2.name: " + myMovie.name)
        //alert("myMovie2.constructor: " + myMovie.constructor.name)
        //alert("myMovie2.moviePosterType (DEFAULT), 1852796517 = NONE" + myMovie.moviePosterType);
        //myMovie2.moviePosterType = 1852796517; //NONE
        //alert("myMovie2.moviePosterType, 1852796517 = NONE: " + myMovie.moviePosterType);
        //myMovie2.moviePosterType = 2020623970; //STANDARD
        //alert("myMovie2.moviePosterType, 2020623970 = STANDARD: " + myMovie.moviePosterType);
        myMovie2.moviePosterType = 1298558310; //FROM_MOVIE
        //alert("myMovie2.moviePosterType, 1298558310 = FROM_MOVIE: " + myMovie.moviePosterType);
        //myMovie2.moviePosterType = 1299216505; //PROXY_IMAGE
        //Add a preview image. You'll have to provide a valid path on your system.
        //myMovie2.posterFile = "~/Desktop/SWFsivut/a1.flv"; // this path works with colons !!!!
        //myMovie2.posterFile = "EkinHD/SWFsivut/01b.jpg"; // this path dont with slahes !!!!
        //alert("myMovie2.moviePosterType, 1299216505 = PROXY_IMAGE !!!: " + myMovie.moviePosterType);
        //</fragment>
    function myTeardown(){

    ... still continuation to my question...
    You can put the poster for SWF using UI Media panel as shown here. So does this mean that there is a bug in a scripting environment?

  • Inconsistent behavior when selecting single or multiple messages

    Mail seems very sensitive when selecting messages, either single or multiple. It often opens a message I have single clicked on (I do not use the pane) so that I could delete, and when selecting multiple messages for deletion or filing it often opens them all up as if i double clicked on the last one selected even though i didn't double click. This happens with both an external mouse and when using the trackpad button on my PB, and i have moved the double click settings all the way to the far right but that still didn't fix it. I have never had this problem with any other program, and I regularly select multiple messages in Entourage and never accidently open multiple copies.
    I am glad that Mail warns you if you are up above a certain number so it won't accidently open 50 messages in 50 windows, but it is still annoying. Is there any fix for this or is Mail just extra sensitive to message selection somehow? I swear it opens messages sometimes with a single click though. Any thoughts/ideas/solutions are appreciated.
    Thanks,
    -Lewis

    okay, i've just begun using Mail so perhaps it's just something that i am doing that i can learn to change, but if anyone else has experienced this and has any hints as to what i'm doing or what's going please let me know. it happens quite frequently and is very annoying. i gave mail a shot on another computer a couple of years ago and i don't remember if this happened or not, but this is the first time i've used it consistently.
    thanks!
    -lewis

  • Inconsistent Behavior When Displaying Word Document

    I use the following code to display an OrdDoc object on a web page using a servlet. When the object is a Word document and it is being displayed for the first time, the Word application handles the document. The second time it is displayed, the IE browser plug-in handles the document. Can you tell me why this is so? How can I get the Word document to just display in the IE browser everytime? Image objects are consistently displayed in the browser. Thank you.
    OrdDoc ordDoc = (OrdDoc)rset.getORAData(1,(ORADataFactory)OrdDoc.getORADataFactory());
    OrdHttpResponseHandler handler = new OrdHttpResponseHandler(actionRequest.getHttpRequest(),actionRequest.getHttpResponse());
                   handler.sendDoc(ordDoc);

    The ORDDoc type will not be able to recognized the WORD document and set the mimetype attribute correctly. Thus when you populate the object you should set the mimetype attribute yourself using the setMimeType() method of ORDDoc.
    When the object is fetched and sent on by the HttpResponseHandler, the handler will use the mimetype setting to set that field in the Response header. This should help browsers to handle the content correctly.

  • Inconsistent behavior when switching application windows with command ~

    When using Safari, Firefox, and most other applications, I find that I can quickly toggle through each application's open windows using the <command><~> key combination.  However, some applications (such as Preview) seem to ignore this command.  I was just wondering it there is a way to configure non-compliant applications to respect this key sequence.  I just find it far more convenient to use a keystroke macro than reaching for the mouse.
    Thanks

    OK now I plugged in and switched back to mac and it is working properly...
    I think this is a weird problem...

  • When placing a Word document in a frame, the text over fills the frame boundaries.

    When I attempt to place a Word document in an InDesign text frame, the text flows outside the boundaries of the frame. This also happens if I use the InDesign placeholder text.

    The forums do not accept attachments, so  if that's how you tried to post a screen shot please come back to the web page and use the camera icon to embed it in a post, like this:

  • Two finger scrolling when a PDF file is inside a frame

    It seems two finger scrolling does not work for PDFs inside a frame. An example of this is the Wiley Inter Science webpage. Any suggestions?

    This has come up a number of times in the forum. Some web sites employ either proprietary or Flash enabled GUI objects on their pages. These simply will not work in the ipad's Safari. There really is no workaround. I've contacted the web site's webmaster whenever I run across one of these. I would think that with the number of iPad users going into millions, web sites would want to change such behavior. They need to know.

Maybe you are looking for

  • Hal.dll corrupted error on startup

    Hi there. I recently had rather a nasty bout of spywere problems. after tryign Norton anti-spywere, i have the following problem; On startup, i get the toshibas splash screen, and then the error message : Windows cannot find the file: hal.dll it may

  • Can't remove file

    Trying to kill a file in my trash which refuses to be removed.     File name is   A9AE␀␀␀␀.␀␀␀     How can I get rid of this?  

  • Clone ListView and add to exsiting Listview in a Windows 8.1 app

    I am trying to copy a ListView and add to an existing ListView (creating a sub-list).  here is my XAML for the ListView: <ListView x:Name="ListOfTasks" IsItemClickEnabled="False" HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch" Grid

  • I am trying to activate adobe XI pro .

    I am trying to set up a trial version of adobe acrobat pro, when I get to the sign in page it will not sign in although it is fast enough to tell me that I have entered the wrong password. Can anyone help?

  • Unsupported image format Canon G2 CRW

    I downloaded the trial to see if Aperture is something I would like to use. I have an old Canon PowerShot G2 and I shoot in RAW. The file type is CRW. After making a new project I select Import and import the CRW files into the Aperture library but i