StylePad demo - scaling it

Hi, I'm trying to modify the Stylepad demo (located in $JAVA_HOME/demo/jfc/Stylepad) so that it works 100% with a scaled instance of Graphics2D.
I've seen a bit of discussion around this (scaling/zooming a JTextPane/JTextComponent) - but I have yet to see a solution.
Just overriding JTextPane's paintComponen() method and serving it a scaled Graphics2D instance opened up a box of problems :) - to which I would appreciate solution suggestions to.
I've modified StylePad.java's createEditor() method. Here it is:
    protected JTextComponent createEditor() {
           StyleContext sc = new StyleContext();
           final DefaultStyledDocument doc = new DefaultStyledDocument();
              initDocument(doc, sc);
          final JTextPane p = new JTextPane(doc){
              public void paintComponent(Graphics g) {
                        Graphics2D g2d = (Graphics2D)g;
                     g2d.scale(0.5,0.5);
                     super.paintComponent(g2d);
                p.setCaret(new ScaledCaret()); // my custom caret
                p.addCaretListener(new CaretListener() {
                        public void caretUpdate(CaretEvent e) {
                            p.repaint();
             MouseInputAdapter mh = new MouseInputAdapter() {
                        public void mousePressed(MouseEvent e) {
                                p.repaint();
                       public void mouseDragged(MouseEvent e) {
                                p.repaint();
                p.addMouseListener(mh);
                p.addMouseMotionListener(mh);
                p.setDragEnabled(true);
     /* My own BasicTextPaneUI implementation, commented out for now
        ScaledTextUI sTextUI = new ScaledTextUI();
        p.setUI(sTextUI);
        return p;
    }The first problem I encountered was that the Caret position was all wrong. So, I created my own caret implementation that extends DefaultCaret. Remember that this is just test code to get it working with the scale 0.5,0.5 which I use in StylePad ..
import javax.swing.text.DefaultCaret;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
public class ScaledCaret extends DefaultCaret {
     * Moves the caret position
     * according to the mouse pointer's current
     * location.  This effectively extends the
     * selection.  By default, this is only done
     * for mouse button 1.
     * @param e the mouse event
     * @see MouseMotionListener#mouseDragged
    public void mouseDragged(MouseEvent e) {
        MouseEvent p = new MouseEvent((Component)e.getSource(),e.getID(),e.getWhen(),e.getModifiers(),(int)Math.round(e.getX()*2), (int)Math.round(e.getY()*2),e.getClickCount(),e.isPopupTrigger());
        super.mouseDragged(p);
     * Tries to set the position of the caret from
     * the coordinates of a mouse event, using viewToModel().
     * @param e the mouse event
    protected void positionCaret(MouseEvent e) {
        MouseEvent p = new MouseEvent((Component)e.getSource(),e.getID(),e.getWhen(),e.getModifiers(),(int)Math.round(e.getX()*2), (int)Math.round(e.getY()*2),e.getClickCount(),e.isPopupTrigger());
        super.positionCaret(p);
}That fixed the Caret positioning problems - but it still does not blink (once scaled the caret stops blinking).
The problem I am working with now is the size of the component.
If you run the StylePad demo with the above code you will experience problems with the painting of the JTextPane .. the ScrollPane obviously thinks its bigger than what it is, and around the JTextPane a lot of "rubbish" is painted.
My next step was creating a class extending BasicTextPaneUI. I did this, overriding getMaximumSize(), getPeferredSize() and getMinimumSize() to always return a specific dimension. It did not fix the problems I described above..
Hope someone takes an interest in this problem :)

Hi again,
I found out that the scaled painting should be done in the JTextPane's paintComponent method (this will affect all children). Doing them in the view's messed up things ..
I do however still have problems. Trying to implement your code everything looks pretty messed up.. Here's my EditorKit and ViewFactory if you would be kind enough to take a look at it:
    static class MyEditorKit extends StyledEditorKit implements ViewFactory {
      * Fetches a factory that is suitable for producing
      * views of any models that are produced by this
      * kit.  The default is to have the UI produce the
      * factory, so this method has no implementation.
      * @return the view factory
        public ViewFactory getViewFactory() {
         return this;
         * Creates an uninitialized text storage model (PlainDocument)
         * that is appropriate for this type of editor.
         * @return the model
        public Document createDefaultDocument() {
            return new DefaultStyledDocument();
      * THIS IS COPIED FROM StyledEditorKit
      * Creates a view from the given structural element of a
      * document.
      * @param elem  the piece of the document to build a view of
      * @return the view
      * @see View
      public View create(Element elem) {
         String kind = elem.getName();
         if (kind != null) {
          if (kind.equals(AbstractDocument.ContentElementName)) {
                    return new MyLabelView(elem);
          } else if (kind.equals(AbstractDocument.ParagraphElementName)) {
              return new MyParagraphView(elem);
          } else if (kind.equals(AbstractDocument.SectionElementName)) {
              return new MyBoxView(elem, View.Y_AXIS);
          } else if (kind.equals(StyleConstants.ComponentElementName)) {
              return new MyComponentView(elem);
          } else if (kind.equals(StyleConstants.IconElementName)) {
              return new IconView(elem);
         // default to text display
            return new LabelView(elem);
     }Here's an example of one of the view's (MyParagraphView since that is the one that is used frequently (always?):
        static class MyParagraphView extends javax.swing.text.ParagraphView {
            public MyParagraphView(Element elem) {
                super(elem);
                System.out.println("new MyParagraphView()");
             * Determines the minimum span for this view along an
             * axis.  This is implemented to provide the superclass
             * behavior after first making sure that the current font
             * metrics are cached (for the nested lines which use
             * the metrics to determine the height of the potentially
             * wrapped lines).
             * @param axis may be either View.X_AXIS or View.Y_AXIS
             * @return  the span the view would like to be rendered into.
             *           Typically the view is told to render into the span
             *           that is returned, although there is no guarantee.
             *           The parent may choose to resize or break the view.
             * @see View#getMinimumSpan
            public float getMinimumSpan(int axis) {
                float f = super.getMinimumSpan(axis);
                System.out.print("getMinimumSpan() from super ="+f+" .. ");
                if(axis == View.X_AXIS) {
                    f *= StylePadConstants.X_SCALE_FACTOR;
                } else {
                    f *= StylePadConstants.Y_SCALE_FACTOR;
                System.out.println("new ="+f);
                return f;
             * Determines the maximum span for this view along an
             * axis.  This is implemented to provide the superclass
             * behavior after first making sure that the current font
             * metrics are cached (for the nested lines which use
             * the metrics to determine the height of the potentially
             * wrapped lines).
             * @param axis may be either View.X_AXIS or View.Y_AXIS
             * @return  the span the view would like to be rendered into.
             *           Typically the view is told to render into the span
             *           that is returned, although there is no guarantee.
             *           The parent may choose to resize or break the view.
             * @see View#getMaximumSpan
            public float getMaximumSpan(int axis) {
                float f = super.getMaximumSpan(axis);
                if(axis == View.X_AXIS) {
                    f *= StylePadConstants.X_SCALE_FACTOR;
                } else {
                    f *= StylePadConstants.Y_SCALE_FACTOR;
                return f;
             * Determines the preferred span for this view along an
             * axis.  This is implemented to provide the superclass
             * behavior after first making sure that the current font
             * metrics are cached (for the nested lines which use
             * the metrics to determine the height of the potentially
             * wrapped lines).
             * @param axis may be either View.X_AXIS or View.Y_AXIS
             * @return  the span the view would like to be rendered into.
             *           Typically the view is told to render into the span
             *           that is returned, although there is no guarantee.
             *           The parent may choose to resize or break the view.
             * @see View#getPreferredSpan
            public float getPreferredSpan(int axis) {
                float f = super.getPreferredSpan(axis);
                System.out.print("getPreferredSpan() - from super="+f+"  .. ");
                if(axis == View.X_AXIS) {
                    f *= StylePadConstants.X_SCALE_FACTOR;
                } else {
                    f *= StylePadConstants.Y_SCALE_FACTOR;
                System.out.println("new="+f);
                return f;
             * Provides a mapping from the document model coordinate space
             * to the coordinate space of the view mapped to it.  This makes
             * sure the allocation is valid before calling the superclass.
             * @param pos the position to convert >= 0
             * @param a the allocated region to render into
             * @return the bounding box of the given position
             * @exception BadLocationException  if the given position does
             *  not represent a valid location in the associated document
             * @see View#modelToView
            public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException {
                Rectangle r = (Rectangle)super.modelToView(pos, a, b);
                r.x *= StylePadConstants.X_SCALE_FACTOR;
                r.y *= StylePadConstants.Y_SCALE_FACTOR;
                r.width *= StylePadConstants.X_SCALE_FACTOR;
                r.height *= StylePadConstants.Y_SCALE_FACTOR;
                return r;
             * Provides a mapping from the view coordinate space to the logical
             * coordinate space of the model.
             * @param x   x coordinate of the view location to convert >= 0
             * @param y   y coordinate of the view location to convert >= 0
             * @param a the allocated region to render into
             * @return the location within the model that best represents the
             *  given point in the view >= 0
             * @see View#viewToModel
            public int viewToModel(float x, float y, Shape a, Position.Bias[] bias) {
                float newx = (float)(x*StylePadConstants.X_SCALE_FACTOR);
                float newy = (float)(y*StylePadConstants.Y_SCALE_FACTOR);
                Rectangle r = a.getBounds();
                r.x *= StylePadConstants.X_SCALE_FACTOR;
                r.y *= StylePadConstants.Y_SCALE_FACTOR;
                r.width *= StylePadConstants.X_SCALE_FACTOR;
                r.height *= StylePadConstants.Y_SCALE_FACTOR;
                int i = super.viewToModel(newx, newy, r, bias);
                return i;
        }What happens is that text elements are displayed on top of other text elements etc.
All the other views (MyBoxView etc.) contains the same code as the one above. I copied the create() method from StyledEditorKit's ViewFactory.
StylePadConstants merely contains the x/y scale factor.
Best regards,
Bjorn

Similar Messages

  • StyledEditorKit.FontFamilyAction() with JComboBox

    I have a JTextPane (with a StyledDocument attached), which I would like to style. So, I setup a JComboBox containing all the fonts on the user's system. The idea is that when a user selects a font from the combobox, the textpane's current font is altered. I've been referring to the Java Docs as well as the JFC Stylepad demo to get this up and running.
    However, it's not working at all. I have tried a number of things, but they have all failed. One of my attempts is below:
    for (int i = 0; i < fontslist.length; i ++) {
      ActionListener al = new StyledEditorKit.FontFamilyAction("set-font-" + fontslist,fontslist[i]);
    JComboBox.addActionListener(al);
    I'm just not sure what to do... I've tried everything I can think of, ActionListeners, ItemListeners and various combos of both - please help, before I go nuts trying to work this out!

    Hi,
    JComboBox.setAction(fontFamilyAction);
    should do, supposed respective action has proven to work as expected.
    Ulrich

  • Times ten not scaling how to speed up.

    Hello Everyone,
    I am doing evaluation of times ten to use it as cache but it is not scaling in my test bed:
    From the http://vimeo.com/28397753 demo it seems it can do 5 million transaction per minute by in my test bed which is 4 gb machine it is taking sweet 140 seconds to insert 100 K records almost 120 times slower!
    I have only one table with a integer column and only one index on that column which is not unique.
    TermSize: 1024m
    PermSize: 2024m
    We want a scallable solution that can go upto 250 Million records in a table (and we will have two such table other will be smaller) is it possible with times ten?
    Our queries will generally requst 50K results and we will have 12 fields in this table numeric and integer that we are going to separately index.
    Look up also on a one integer table are taking about 100 milliseconds.
    I am using a TimesTenDataSource ds = new TimesTenDataSource();
    String URL = "jdbc:timesten:direct:TT_1121";
    I tried doing batch inserts of 25,100,500,100 rows per insert with not much improvement.
    Is oracle times ten even fit for such a case?
    thanks and regards,
    sumit

    You say that your machine has 4 GB RAM but you have allocated over 3 Gb to TimesTen. That's fine if there is pretyt much nothing else running o nthe machine but if you have otjer things (such as Oracle DB maybe?) running o nthe machine at the same tiem then you are likely running low on memory. Are you seeing significant page in and pageout acticity when the test runs? If so this will seriously impact performance.
    Can you please provide:
    1. A description of the overall hardware and software environment that you are using for the test.
    2. The exact TimesTen version (output of ttVersion) command.
    3. The DSN configuration (from sys.odbc.ini)
    4. The actual table (or cache group) defintiion including any indexes.
    5. Details of the Java test program. In particular; are you using parameterised INSERT statements? Are you preparing them just once and executing them many times? How often do you commit during the bulk load? etc.
    Thanks,
    Chris

  • Prevent scaling of leaf nodes

    I am trying to implement a simple map solution in JavaFX 2.0. I have map object in a given resolution and some "car" objects (for example Rectangle) that I would like to overlay the map.
    My intention is to create a Group node containing the map objects and the "car" objects. This way I would be able to pan / zoom by only changing the Group transformation. For the map objects this should work fine. For the "car" object, I would like to apply the same transformation to simplify the positioning of the objects. But, the transformation seems to also be used to draw the shape (i.e. effecting the size of the "car").
    I can think of two options:
    1. Apply the inverse transform when drawing the shape
    2. Draw a bit map
    I really just want to be able to draw a simple shape (fixed size in pixels is OK), but at the same time utilise the group transformation for pan / zoom operations. What is the best practice here? If the Rectangle is 20x20 pixels, I would like to offset the Rectangle by 10 pixels to get it centred correctly.
    PS
    I would like to avoid using an image, since I might need to change it dynamically (minor changes like colour, line-width, etc.).
    Edited by: 885374 on Sep 15, 2011 2:35 AM

    Hi Zonski
    Thanks for your suggestions. The scaling hint was realy helpfull. No luck with the StackPane though, since it seemed to scale the map objects in unwanted ways (got hints about that from the API documentation too). For your convenience, I have included a small example illustrating what I came up with. The example compiles on 'javafx_apps-2_0-beta-b42-23_aug_2011' and you may play with the Zoom factor and Pan offsets to observe the effect.
    Please feel free to comment or suggest changes!
    package com.demo.javafx;
    import javafx.application.Application;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Polygon;
    import javafx.scene.shape.SVGPath;
    import javafx.scene.transform.Scale;
    import javafx.scene.transform.Translate;
    import javafx.stage.Stage;
    import java.util.Collection;
    import java.util.LinkedList;
    * Simple map / track solution demonstrating the use of separate map and track groups to ease pan / zoom operations
    * in the map while maintaining the size of the track objects. Below is a illustration of the scene graph:
    * root (Group)
    *    --> mapLayers (Group)
    *           --> mapLayer1 (Group)
    *                  --> Blue Polygon
    *           --> mapLayer2 (Group)
    *                  --> Green Polygon
    *    --> trackLayer (Group)
    *           --> trackShape (SVGPath)
    * Note!
    * Coordinate (0, 0) is in the center of the window when PAN_OFFSET_X and PAN_OFFSET_Y is zero.
    public class StackPaneDemo extends Application {
        private static final int SCREEN_WIDTH = 600;
        private static final int SCREEN_HEIGHT = 600;
        private static final double ZOOM_FACTOR = 1.0;
        private static final double PAN_OFFSET_X = 0.0;
        private static final double PAN_OFFSET_Y = 0.0;
        @Override
        public void start(final Stage stage) throws Exception {
            Group root = new Group();
            Scene scene = new Scene(root, SCREEN_WIDTH, SCREEN_HEIGHT, Color.BLACK);
            stage.setScene(scene);
            // First map layer
            Group mapLayer1 = new Group();
            mapLayer1.getChildren().addAll(new PolygonShape(Color.BLUE, 0.0, 0.0, -100.0, 0.0, -100.0, -100.0, 0.0, -100.0));
            // Second map layer
            Group mapLayer2 = new Group();
            mapLayer2.getChildren().addAll(new PolygonShape(Color.GREEN, 0.0, 0.0, 100.0, 0.0, 100.0, 100.0, 0.0, 100.0));
            // Create the map group with two map layers
            // 1. The map group is there to be able to pan / zoom all map layers at once (i.e. not each individual layer)
            // 2. Multiple map layers are added to be able to hide map details later (i.e. hide individual layers)
            Group mapLayers = new Group();
            mapLayers.getChildren().addAll(mapLayer1, mapLayer2);
            // Translate and scale the map
            mapLayers.getTransforms().addAll(new Translate(-PAN_OFFSET_X + SCREEN_WIDTH / 2,
                                                           PAN_OFFSET_Y + SCREEN_HEIGHT / 2),
                                             new Scale(ZOOM_FACTOR, ZOOM_FACTOR));
            // Create the a track layer
            Group trackLayer = new Group();
            trackLayer.getChildren().addAll(new TrackShape(0, 0), new TrackShape(100, 100), new TrackShape(200, 200));
            // Translate the track layer
            trackLayer.getTransforms().addAll(new Translate(-PAN_OFFSET_X + SCREEN_WIDTH / 2,
                                                            PAN_OFFSET_Y + SCREEN_HEIGHT / 2));
            // Add the map / track layers to the root node
            root.getChildren().addAll(mapLayers, trackLayer);
            // Show the stage
            stage.show();
         * Simple track representation using SVG Path (need to flip the y-axis)
        private class TrackShape extends SVGPath {
            public TrackShape(final double x, final double y) {
                setTranslateX(x * ZOOM_FACTOR);
                setTranslateY(-y * ZOOM_FACTOR);  // Note: Positive Y should point upwards
                setStroke(Color.WHITE);
                setContent("M0,-10 V10 M-10,0 H10");
         * Simple map object using Polygon (need to flip the y-axis)
        private class PolygonShape extends Polygon {
            public PolygonShape(final Color color, final Double ... points) {
                final Collection<Double> pointsWithFlippedYAxis = new LinkedList<Double>();
                boolean isYCoordinate = false;
                for (Double point : points) {
                    pointsWithFlippedYAxis.add(isYCoordinate ? -point : point);  // Note: Positive Y should point upwards
                    isYCoordinate = !isYCoordinate;
                getPoints().addAll(pointsWithFlippedYAxis);
                setStroke(color);
        public static void main(String[] args) throws InterruptedException {
            launch(args);
    }

  • NSAffineTransform scaling problem

    Hi all,
    Can anyone please help me out with the following problem?
    Among other features, my first Cocoa app has a custom imageView within a scrollView. After loading an image, I'm looking to resizing it with a slider. The following relevant code snippets, hacked together from pieces of what demo code I could find (or -- as a newbie -- understand) load the image okay:
    /* interface */
    #import <Cocoa/Cocoa.h>
    #import "MyImageView.h"
    @interface AppController : NSObject
    IBOutlet NSWindow *theWindow;
    IBOutlet MyImageView *theImageView; // the (upper) graphics window.
    IBOutlet NSScrollView *theScrollView;
    IBOutlet NSSlider *zoomSlider;
    NSImage *theImage;
    - (IBAction)changeScale:(id)sender;
    - (void)scaleImageTo:(float)scale;
    - (void)scaleFrameBy:(float)scale;
    @end
    /* implementation */
    #import "AppController.h"
    @implementation AppController
    - (IBAction)openSourceImage:(id)sender
    NSString *filename = [self chooseFile:@"imageFile"];
    if([filename isEqualToString:@""]) // no choice made, so exit...
    return;
    theImage = [[NSImage alloc] initWithContentsOfFile:filename];
    if (theImage != nil)
    [theImageView setImage:theImage];
    [self scaleImageTo:1.0];
    // Resize imageView to fit image; causes the surrounding NSScrollView to adjust its scrollbars appropriately.
    [theImageView setFrame:
    NSMakeRect([theImageView frame].origin.x, [theImageView frame].origin.y, [theImage size].width, [theImage size].height)];
    [theImageView scrollRectToVisible:
    NSMakeRect([theImageView frame].origin.x, [theImageView frame].origin.y + [theImageView frame].size.height, 1, 1)];
    [theImage release];
    // Set "open hand" cursor as the documentCursor for our ScrollView.
    // We use the centre point of the cursor as its hotspot.
    NSCursor *handCursor = [[NSCursor alloc] initWithImage:[NSImage imageNamed:@"hand_open"] hotSpot:NSMakePoint(8, 8)];
    [(NSScrollView*)[theImageView superview] setDocumentCursor:handCursor];
    [handCursor release];
    // change image scale from slider input
    - (IBAction)changeScale:(id)sender
    [self scaleImageTo:([sender floatValue] / 100.0)];
    NSLog(@"image scale = %f",([sender floatValue] / 100.0));// what size have I got here...?
    - (void)scaleImageTo:(float)scale
    [self scaleFrameBy:scale]; // ...Houston, we have a problem...
    [zoomSlider setFloatValue:(scale * 100)];
    // transform and display the modified image
    - (void)scaleFrameBy:(float)scale
    NSSize imageSize = [theImage size];
    NSLog(@"image size = %d",imageSize);
    NSAffineTransform *at = [NSAffineTransform transform];
    [at scaleBy:scale];
    [theImageView setFrameSize:[at transformSize:imageSize]];
    [theImageView setNeedsDisplay:YES];
    @end
    However, zooming doesn't work properly of course, and even I can see why it won't...
    When the image is loaded it appears scaled to normal size by 'scaleImageTo:' and everything is good to this point. But when I try sizing it up with the slider, the image remains normal size and only the image frame gets bigger due to 'scaleFrameBy:'. This ultimately forces the image out of view at upper left of the scrollView. When I try to size the image down the image shrinks away to nothing at lower left of the window.
    I also notice that a slider value < 1.0 makes it shrink to the image's origin at bottom left, a value == 1.0 is the only 'happy' middle ground where everything is normal, and a value > 1.0 just grows the image's frame, leaving the image itself at its default (1:1) scale. Obviously, passing in a value > 1.0 with something along the lines of 'scale image x3' isn't going to work, and I now understand that it only wants to see a value between 0 and 1.
    I feel I've got the problem 90% solved but I'm obviously missing some way of scaling the image rather than its frame, or tying the image and frame together. I've looked for a logical companion to 'setFrameSize' (perhaps 'setImageSize'?) but without any luck. I'm sure I'm making a really dumb, basic obvious mistake here, but I've only been Cocoa programming five weeks now.
    What changes would I need to make/what critical code have I missed out to make this work please?
    Ernie

    Just to update this question, guys...
    I solved the zoom problem by (1) changing the image-loading code in my 'openSourceImage' method from:
    theImage = [[NSImage alloc] initWithContentsOfFile:filename];
    if (theImage != nil)
    [theImageView setImage:theImage];
    [self scaleImageTo:1.0];
    <snip>
    to now read:
    theImage = [[NSImage alloc] initWithContentsOfFile:filename];
    if (theImage != nil)
    [theImageView setImage:theImage];
    //**** next two lines seem vital for enlargement ***
    [theImage setScalesWhenResized:YES];
    [theImage setSize:NSMakeSize(2500.0,2500.0)]; // biggest desired size
    [self scaleImageTo:0.45]; // was previously set to 1.0
    <snip>
    I arbitrarily set 'setSize:MakeNSSize()' to display the loaded (page) image at the highest magnification I'd need, set the 'scaleImageTo:' value to a good default view setting -- and of course, set the slider range in IB between 0.22 and 1.0 (previously set to a max 100) now that I've learned that NSAffineTransform only wants to see a value between 0-1.
    What I HAVEN'T yet resolved is how to maintain a fixed 'view origin' (??) if you get what I mean. Since the image's origin appears to be the bottom left corner of the view, zooming in/out still causes the viewed text to shift horizontally and vertically. How can I fix this?
    Also, if I'm doing anything bad anywhere in my code, please feel free to correct me where necessary.

  • Exporting to PNG, Stroke Weight not Scaling with Export Scale

    Hi there
    I am having some issues exporting illustrator documents to multiple sizes of PNG.
    I am actually scripting this, but the issue seems to be more general - hence the posting here.
    If you export a PNG through the web and devices tool:
    File->Save for Web & Devices
    And you scale the image by 50%, the line weight does not seem to be scaled with the export scale.
    In Illustrator->Preferences->General I have Scale Strokes and Effects ticked.
    This problem is also apparent when scaling a scripted PNG export through the ExportOptionsPNG24 class.
    Is there anything I am missing please - or does anyone know of workarounds?
    Thank you

    Thanks for looking into it Kurt.
    I can't post the illustrator file in question to the forum.
    And, you are right, when I aim to make a demo file from scratch I can't reproduce the problem either.
    I am having this difficulty on multiple files though, and they are all quite complex.
    I will aim to try and make a file that shows the problem.
    The files in question may have symbols that were created in much earlier versions of Illustrator.
    I'm not sure if that could do it.
    The sequence above shows the output as I export via script to successively smaller scales.
    This is by setting the horizontalScale and verticalScale in ExportOptionsPNG24.
    I see the same results if scaling in Save for Web & Devices.

  • Nummeric Scaling Bug?

    Hello,
    I'm currently using a demo of Flash 8 and I can't seem to use
    the nummeric scaling option properly.
    Whenever I enter a scale value above 200%, or whenever I
    manually scaled it above 200% and want to bring it back to 100%
    nummeric wise, then the scaling goes haywire.
    It then produces random percentages and always moves my
    object out of sight/out of the workspace boarder.
    Anyone else encountered this and/or knows how to fix/work
    around it?
    Thanks in advance.

    I'm having the same scaling issues with ProRes files. When I bring in the original R3D files, they scale down fine. I tried ProRes 422 HQ and ProRes 4444 and had the same issues. I was rendering out the ProRes files out of AE. No color correction done yet.
    Premiere Pro CC 2014.1
    OS X 10.9.4
    2 x 2.93 Ghz 6-Core Intel Xeon
    29 GB 1333 Mhz DDR3
    ATI Radeon HD 5770 1024 MB

  • Free of charge demo goods

    Hi All,
    I have an issue that when you do free of charge demo goods how can we track wheather customer has return the goods or not.
    Thanks
    Arun

    Hi
    Why do you want to change the ownership of the demo pieces. If you do the free of charge delivery, the company is going to lose the ownership of the piece. Why don't you consider using the CONSIGNMENT concept for this demo pieces. The stock will be maintained as special stock and whenever it is returned, will be added to the plant stock.
    Thanks,
    Ravi Sankar

  • Unable to Check in Business Services in JDE DEMO.

    Hi,
    We have ERP 8.97 JDE tool set installed on our local m/c. We are unable to check in the Business Services (BSSV) object (JP55HOL) in JDE DEMO. We also tried checking in the vanilla BSSV (J0000030) after we had chekced it out, but this also did not work out. We are getting the error: General Error in Method, Check-in. However we had no issues in checking in the regular JDE objects.
    Please help!!!
    -Shahid

    Demo E900 is a big mess, perhaps "Oracle Lab" packaged it this way.
    Do this:
    1- Create a project "Temp"
    2- Check out F986020 & F986030 (only specs available, no table exists in the data source) - if you try to see by UTB or databrowser
    3- Generate table & index in design (take every thing as default)
    4- Now try check-in your BSSVs.
    5 Goodluck

  • GlassFish v2.1.1 and adf demo

    Hello,
    I'm trying to deploy the rich client component runtime demo(see this) on "Sun GlassFish Enterprise Server v2.1.1". This is a clean install, i havn't deployed anything else. When i drop rcf-dvt-demo.war and surf to http://localhost:8080/rcf-dvt-demo/ i get http status 503. I have tried to google but with no luck..
    My logs says:
    [#|2010-04-10T20:00:17.972+0200|SEVERE|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=17;_ThreadName=Timer-9;/C:/Sun/SDK/domains/domain1/autodeploy/rcf-dvt-demo.war;_RequestID=bacf3ad7-227b-4135-a059-145209b455fe;|"DPL8004: file open failure; file = /C:/Sun/SDK/domains/domain1/autodeploy/rcf-dvt-demo.war"|#]
    [#|2010-04-10T20:00:17.988+0200|INFO|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=17;_ThreadName=Timer-9;|[AutoDeploy] The copy operation for C:\Sun\SDK\domains\domain1\autodeploy\rcf-dvt-demo.war into the auto-deploy directory may still be in progress or the file may be corrupt; will retry periodically until at least Sat Apr 10 20:00:47 CEST 2010|#]
    [#|2010-04-10T20:00:19.972+0200|SEVERE|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=17;_ThreadName=Timer-9;/C:/Sun/SDK/domains/domain1/autodeploy/rcf-dvt-demo.war;_RequestID=bacf3ad7-227b-4135-a059-145209b455fe;|"DPL8004: file open failure; file = /C:/Sun/SDK/domains/domain1/autodeploy/rcf-dvt-demo.war"|#]
    [#|2010-04-10T20:00:21.972+0200|INFO|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=17;_ThreadName=Timer-9;|[AutoDeploy] Selecting file C:\Sun\SDK\domains\domain1\autodeploy\rcf-dvt-demo.war for autodeployment.|#]
    [#|2010-04-10T20:00:48.925+0200|SEVERE|sun-appserver2.1|org.apache.jasper.servlet.JspServlet|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=88635a24-548b-47de-a8a6-c0b35438ee8e;|PWC6117: File "C:\Sun\SDK\domains\domain1\docroot\rcf-dvt-demo\faces\index.jspx" not found|#]
    [#|2010-04-10T20:00:52.706+0200|WARNING|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=17;_ThreadName=Timer-9;_RequestID=bacf3ad7-227b-4135-a059-145209b455fe;|Error in annotation processing: java.lang.NoClassDefFoundError: weblogic/servlet/http/AbstractAsyncServlet|#]
    [#|2010-04-10T20:00:53.253+0200|INFO|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=17;_ThreadName=Timer-9;|deployed with moduleid = rcf-dvt-demo|#]
    [#|2010-04-10T20:00:54.534+0200|INFO|sun-appserver2.1|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=17;_ThreadName=Timer-9;/rcf-dvt-demo;|Initializing Mojarra (1.2_13-b01-FCS) for context '/rcf-dvt-demo'|#]
    [#|2010-04-10T20:00:54.800+0200|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=17;_ThreadName=Timer-9;_RequestID=bacf3ad7-227b-4135-a059-145209b455fe;|WebModule[/rcf-dvt-demo]PWC1275: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
    com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! This parser does not support specification "null" version "null"
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:215)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:196)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4655)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5364)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:345)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:986)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:970)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:704)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1649)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1254)
    at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:182)
    at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:278)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1005)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:992)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
    at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
    at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:231)
    at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
    at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:280)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:298)
    at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:584)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:390)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:373)
    at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
    at $Proxy1.invoke(Unknown Source)
    at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
    at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:170)
    at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:583)
    at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:564)
    at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:495)
    at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:270)
    at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
    Caused by: java.lang.UnsupportedOperationException: This parser does not support specification "null" version "null"
    at javax.xml.parsers.DocumentBuilderFactory.setSchema(DocumentBuilderFactory.java:561)
    at com.sun.faces.config.ConfigManager$ParseTask.getBuilderForSchema(ConfigManager.java:522)
    at com.sun.faces.config.ConfigManager$ParseTask.getDocument(ConfigManager.java:455)
    at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:416)
    at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:373)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
    |#]
    [#|2010-04-10T20:00:54.925+0200|SEVERE|sun-appserver2.1|org.apache.catalina.core.StandardContext|_ThreadID=17;_ThreadName=Timer-9;_RequestID=bacf3ad7-227b-4135-a059-145209b455fe;|PWC1306: Startup of context /rcf-dvt-demo failed due to previous errors|#]
    [#|2010-04-10T20:00:55.675+0200|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=19;_ThreadName=pool-7-thread-4;_RequestID=2bc4c823-f1c0-45e5-969b-f3f22885822d;|
    XML-22000: (Fatal Error) Error while parsing XSL file (null).
    |#]
    [#|2010-04-10T20:00:55.691+0200|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=20;_ThreadName=pool-7-thread-1;_RequestID=cfc7e4d3-aeab-474f-8df9-2f1b6d83cc4a;|
    XML-22000: (Fatal Error) Error while parsing XSL file (null).
    |#]
    [#|2010-04-10T20:00:55.691+0200|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=21;_ThreadName=pool-7-thread-2;_RequestID=496239eb-bb33-45c9-acc7-220f68657421;|
    XML-22000: (Fatal Error) Error while parsing XSL file (null).
    |#]
    [#|2010-04-10T20:00:55.691+0200|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=22;_ThreadName=pool-7-thread-3;_RequestID=9e58c64e-e9ef-445f-b1b3-d51e7278b14f;|
    XML-22000: (Fatal Error) Error while parsing XSL file (null).
    |#]
    [#|2010-04-10T20:00:55.691+0200|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=23;_ThreadName=pool-7-thread-5;_RequestID=be2009eb-605f-4137-9fe6-99a7142bcc67;|
    XML-22000: (Fatal Error) Error while parsing XSL file (null).
    |#]
    [#|2010-04-10T20:00:55.753+0200|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=17;_ThreadName=Timer-9;|
    classLoader = WebappClassLoader
    delegate: true
    repositories:
    /WEB-INF/classes/
    ----------> Parent Classloader:
    EJBClassLoader :
    urlSet = []
    doneCalled = false
    Parent -> java.net.URLClassLoader@1370b82
    |#]
    [#|2010-04-10T20:00:55.769+0200|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=17;_ThreadName=Timer-9;|
    SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@ac6572|#]
    [#|2010-04-10T20:00:55.800+0200|INFO|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=17;_ThreadName=Timer-9;|[AutoDeploy] Successfully autodeployed : C:\Sun\SDK\domains\domain1\autodeploy\rcf-dvt-demo.war.|#]

    The demo you loaded is for Weblogic server, not for glassfish. You can't just deploy the demo and run it.
    I'm not even sure it has been done jet, but may be someone has successfully done it.
    Have you searched (google) for a solution?
    Timo

  • Adobe Creative Cloud on Windows + Adobe Acrobat - Keeps going into Demo mode

    Hi,
    Not sure my subject line is accurate, but here's my situation.
    I have Adobe Creative Cloud - Student Membership.
    I have it installed on my Macbook Pro on both the Mac OS X 10.9.2 and Windows 8.1 (Boot Camp) side.
    So this counts as two computers... I have not installed it on any other computer.  Nor have I attempted to sign in to it on any other computer.
    On the Mac side everything is fine.
    On the Windows side... Creative Cloud refuses to stay signed in.  Now, I don't mind clicking sign in and typing my password... it's annoying, but fine... I'll deal with it.
    What I do mind... is Acrobat closing after about 30-45 seconds while I'm in the middle of doing something.  I'll have set everything up and then bam the window closes, no warnings, no requests to save... NOTHING...
    So, I'll do it again... and again... it'll happen.  Eventually it asks me to sign back in and then I'm good for a while.  But it reverts to Demo mode saying I have no trial days left.  But, I'm a paying member!!!!  I shouldn't have to a) log in every day (or sometimes several times a day) or b) have my program literally close without warning while I'm working in it - and sometimes not being able to save the work I just did - and twice already stuff that I CAN'T get back (luckily nothing critical yet).
    Now the shutting down/closing issue seems to be only Acrobat.  The other apps seem to behave as long as I log in with the Creative Cloud systray app.
    Any suggestions???
    Thanks!

    MaxSvedlove please see You are no longer signed into your Creative Cloud applications - http://helpx.adobe.com/creative-cloud/kb/unable-login-creative-cloud-248.html for information on how to resolve your sign in difficulties.

  • Displaying the content of one JPanel in an other as a scaled image

    Hi,
    I'd like to display the content of one JPanel scaled in a second JPanel.
    The first JPanel holds a graph that could be edited in this JPanel. But unfortunately the graph is usually to big to have a full overview over the whole graph and is embeded in a JScrollPanel. So the second JPanel should be some kind of an overview window that shows the whole graph scaled to fit to this window and some kind of outline around the current section displayed by the JScrollPanel. How could I do this?
    Many thanks in advance.
    Best,
    Marc.

    Hi,
    I'd like to display the content of one JPanel scaled
    in a second JPanel.
    The first JPanel holds a graph that could be edited
    in this JPanel. But unfortunately the graph is
    usually to big to have a full overview over the whole
    graph and is embeded in a JScrollPanel. So the second
    JPanel should be some kind of an overview window that
    shows the whole graph scaled to fit to this window
    and some kind of outline around the current section
    displayed by the JScrollPanel. How could I do this?
    Many thanks in advance.
    Best,
    Marc.if panel1 is the graph and panel2 is the overview, override the paintComponent method in panel2 with this
    public void paintComponent(Graphics g) {
    Graphics2D g2 = (Graphics2D) g;
    g2.scale(...,...);
    panel1.paint(g2);
    }

  • How do I maintain responsive scaling on an edge animate animation when I insert it into dreamweaver?

    How do I maintain responsive scaling on an edge animate animation when I insert it into dreamweaver? Please and thank you!

    example.com is a generic http:// address to illustrate the difference between what you gave, file:/// and an actual URL address.  There are no tutorials on that site.  Sorry for the confusion.
    #1 Have you procured your domain name and web hosting yet?  You'll need to do that to publish your pages online.
    #2 When you sign-up for web hosting, the company will send you FTP log-in credentials to your site's web server.    You will enter this info into your DW Site Definition.  Site > New Site >  See screenshots below:
    Under Servers:  Root Directory is whatever your hosting company tells you to use.  This varies by web host.  Some commonly used ones are public_html, www or htdocs.
    After your site definition is set-up, hit the TEST button to confirm it's working.  If it's not connecting, go to More Options.
    Go to the Files Panel (F8).  Use the UP Arrow  to PUT files to remote server.
    Use the DOWN Arrow to GET files from server to your local site folder.
    Post back when you have finished uploading your work to the remote server.
    Nancy O

  • Installation Problem Demo / Trial on Vista

    hey,
    ive donwloaded the trial version for both Premiere Element 7 and Photoshop Elements 7, i am having problems installing them.
    after the setup reaches 100% it rolls back untill 0%, next a window appears telling me that the setup was interrupted. ive ran it under administrator amd the problem still occurs.
    please help,
    thanks

    hey Steve,
    thanks, i didnt think it would be an issue with my system. here's the detail:
    Problem:
    Trying to install PSE7 and PRE7 Trial / Demo. when installation reaches, i guess, 99.9% the installation wizard does a "Rolling back action". a new window then appears telling me "The wizard was interrupted before adobe photoshop elements 7.0 could be completely installed. Your system has not been modified. To complete installation at another time, please run setup again."
    My System:
    Windows Vista 32bit_SP2
    Intel i7 2.67ghz
    6GB_RAM
    3x 500GB_HDD 7200_RPM
    QuickTime and all drivers are upto date.

  • Yoga 2 Pro Resolution Scaling Issues

    So I just picked this laptop up from Best Buy the other day and so far I am loving it. However that is not to say that it has been entirely without issues so far and I do apologize if this issue has been brought up before but I was unable to find a decent answer in my searches.
    I have checked this on a few games but I will focus on one that I want to play the most but also seems to have the most issues.
    So this laptop is just not powerful enough to run a lot of games at the full 3200x1800 resolution and I totally understand that and was not expecting to, however, when turning the resolution down, say to 1600x900 instead of scaling the resolution to fill the screen, it runs it as the actual pixels inside a black box. This has the effect of making the games just too tiny to see, not to mention half or more of the screen is just being wasted.
    This seems to really only happen when running a game in Direct X 11 mode, DX9 seems to work fine, but causes other problems and is really not a great option. Alternately, some games, I can set the windows resolution down (which scales fine in windows) and then the game will run and scale. However, specificially with Civilization 5 (one of the games I was most excited to play) it still does not work properly. There is a work around, but it is less than ideal, and I am at a loss as to why I just cant run the game at a lower resolution and have it scale and fill the screen.
    Any help or information would be greatly appreciated, thanks!

    There is a setting, however, when at native resolution, instead of giving the option to scale to fit display, it just has another option that says maintain display scaling or something like that (I am not on the laptop right now, so I have to double check). As far as I can tell it just does not scale properly. When I change to a non-native resolution, the options change and it then says scale to fit screen, which is what i want.
    However, I would rather not have to change to a non native resolution every time I want to run a game. And, specifically in the case of Civilization 5, it doesn't help. The only thing I have found so far that works at all is to change the resolution to 1920x1080, then set the ingame resolution to 1440x900. It is a pain, and ends up in a streched picture.
    I tried to install the latest intel drivers from their website (not sure if it would have fixed the issue, since there was no changelog) but it gave me an error saying they were not verified for my device.
    This is a rather frustrating issue, especially considering that every computer I have ever owned up until this point has been able to scale the image to fit the screen with no problems what so ever.

Maybe you are looking for

  • Capturing using DV device

    So I have a digital converter attached to my MAC with firewire that I run my camera through to capture video. Before I was capturing to imovie, then transfering to FCE. As noted by Tom, that was a poor way to get video into FCE. So I read the section

  • How to deploy a webservice in a server

    Hi Team, Hi have created small webserver application using powerbuilder 12.5.1 (PB.net).I have deployed the application in my local IIS server.Its working finr.Now i want to deploy the same application in a server, so that it will be available for ex

  • Font Problem using 8.1.3 on OpenSuSE 10.3

    I just installed the rpm AdobeReader_enu-8.1.3-1.i486.rpm that I downloaded from the Adobe web site. After installing it, when I open a PDF I get a pop-up that says: Cannot find or create the font 'Arial.Italic'. Some characters may not display or pr

  • Rejecting unknown recipients at connection level...

    I have modified /etc/postfix/main.cf to reject unknown recipients combined with following additions: /etc/postfix/virtual [email protected] com_mydomain1_user1 [email protected] com_mydomain2_user1 [email protected] com_mydomain1_user2 user2@my

  • Upgrade WLC HA pair 7.4.110.0 to 7.6.130.0

    Hi I'll be upgrading a HA pair of 5508's from 7.4.110.0 to 7.6.130.0. The documentation suggests that I just need to upgrade the active and this code is copied to the standby. Then simply reboot. After this verify that the active is not the standby H