Automatic Resizing of panel with drawings added to a scrollPane

I have a Panel with rectangles text and arcs drawn .and it is added to a scrollPane.both vertical and Horizontal scrollbars are enabled for scrollPane.My problem is that i have to draw arcs connecting these rectangles with text enclosed in it. and when i connect two rectangles a span is formed connecting the two..and as hierarchy goes deeper ie connecting spans of already linked rectangles with similar spans..There wont be enough space at top for arc to be drawn..So ive to either readjust all objects related with drawings in panel or is there any other way to increase panel size automatically as drawings need more space..Please suggest me some method for this problem

Panels Preffered size is set as (3000,1000) and TextRectangles are drawn in panel Cordinates of textRectangle are set in setTextRectangle method and all further drawings connecting rectangle are done by mouse clicks on specific rectangles.
and layout in setTextRectangle is TextLayout of the text enclosed in rectangles.So when i coordinates for arc drawn exceeds the panel should i call separate method for resetting panel size is that what you have suggested
   screen_Resolution = Toolkit.getDefaultToolkit().
                           getScreenResolution();
         screen_Width = Toolkit.getDefaultToolkit().
                           getScreenSize().width;
         screen_Height = Toolkit.getDefaultToolkit().
                          getScreenSize().height;
public void setTextRectangle(Graphics g, Font font)
          Graphics2D g2 = (Graphics2D) g;
         FontMetrics metrics= g.getFontMetrics (font);
        int textHeight = metrics.getHeight();
        int left=textHeight;
        int yCordRectangle=(int)(screen_Height/5);
        for (int i = 0; i < layouts.size (); i++) {
             int top=(int)(screen_Resolution*2);
             for (int j = 0; j < layouts.get (i).size (); j++) {
                 top += textHeight;
    TextRectangle textRectangle=new TextRectangle(left,yCordRectangle,wrapWidth,top-150);
     addtoarray( textRectangle, rectangles);
    left += wrapWidth + textHeight;
   

Similar Messages

  • ADF query panel with table, adding new search fields dynamically

    I am a beginner very new to ADF world. I have a ADF query panel with table which has its source from a ViewCriteria. I need to add a new search field on the form dynamically based on the user's need. Assume I am using a Employee table and I have search "employee ID" as one field in the form, upon clicking a add button in the form I need to have a another "employee ID" field appears along with the already existing one.
    I tried to add the condition in ViewCriteria but do not know how to add it ?
    Could some one pls address how it can be approached ?

    User, please always tell us your jdev version.
    Well, this use case need some thinking to be done. What do you want to archive with adding a new query field to the panel? As you said you already have one field for employeeId and now, on a click on a button, you add another one. How would the resulting query work with the new field? Should it use 'and' to concatenate the query or should it use 'or'?
    I suggest that you use the ADF Riche Client Demo (http://jdevadf.oracle.com/adf-richclient-demo/faces/index.jspx) select the Query node and then select 'af:query'. This shows you what is possible otu of hte box using the af:query component. You can add fields to existing queries in advanced mode (e.g. use system query 5, which starts with an empty panel and allows you to add fields).
    Once you understand how this works you may come back with a more detailed use case description or you have found the solution already. Read the documentation on af:query along with trying otu the component.
    Timo

  • Automatically resizing the tray with respect to iView Size

    Hi,
    I want width of the tray should be automatically resized same as the width of the iView in page layout of the SAP EP.
    I have tried to set the same using "Width of the External Window" property of the iView from content administrator but it doesn't work.
    Any help??
    Thanks,
    Prashant

    hi
    Prashanth,
    you can set the size of the iView trays from the theme editor
    goto sys admin,
    portal display.
    theme editor
    select your theme
    under Complex elements
    iView trays
    but her too you can make it automatic or dynamic(changing the size according to the iViews).
    but can set the size of the trays...
    thas is it.
    Cheers.......

  • Why does Preview automatically resize the text box to cut off the last character of added text? How do I fix it?

    Why does Preview automatically resize the text box to cut off the last character of added text? How do I fix it?
    I use the Tools > Annotate > Add Text feature, and when I click away after adding text, it automatically changes the text box size such that the last letter -- or last word -- gets bumped off into an invisible line below it, forcing me to manually adjust every single text box. It is highly annoying when trying to complete PDF forms (e.g. job applications).
    It appears to be a glitch, quite honestly, an error resulting from Apple's product design. Has it been fixed in the new operating system (for which they want $30)?
    I would very much appreciate any help you can provide! Thank you for your time.

    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • Failing to refresh LOV fields added in the query panel with table

    Hi.. Iam using Jdev 11.1.1.2.0
    I have a scenario like ..i need to add 2 cascaded lovs in search panel and clicking on search button, the result should be displayed in table form.
    For example..
    I have cascaded LOV fields departmentId and Firstname ,
    first name dropdown values depends on the selection of value in DepartmentIddropdown. I need to add only these 2 fields in search panel and clciking on search buton , the result should be displayed in emp table.
    I have achieved the same creating View criteria with 2 fields and dragging and dropping that as query panel with table. But my problem is First name lov is not populating based on department id. It is showing static dropdown list.
    Please help me how to achieve this ? thanks in advance.
    Regards
    Alekhya.

    Thanks for the reply.. actually if iam using those cascaded lovs in a form then we can set properties as u mentioned to refresh and display values correctly in the dropdown.
    My scenario is like i need to use those fields in query panel header
    code snippet
    <af:panelHeader text="Employees" id="ph1">
    <af:query id="qryId1" headerText="Search" disclosed="true"
    value="#{bindings.EmployeesViewCriteria1Query1.queryDescriptor}"
    model="#{bindings.EmployeesViewCriteria1Query1.queryModel}"
    queryListener="#{bindings.EmployeesViewCriteria1Query1.processQuery}"
    queryOperationListener="#{bindings.EmployeesViewCriteria1Query1.processQueryOperation}"
    resultComponentId="::resId1"/>
    </af:panelHeader>
    Iam not having any field names to add properties.
    Regards
    Alekhya

  • Adding panel with Javascript?

    Hi,
    I've written a number of script add-ons for InDesign CS2 and managed to get them installed as menu items. But what I'd really like to do is create a new panel with buttons to activate the scripts inside it. Is there any way I can do this with Javascript? (It needs to use JS as the scripts are used on Macs and PCs).
    Thanks for any help in advance!

    Indeed. This is the code I used, adapted from having found it elsewhere on the net. It doesn't appear to work in CS2, though; CS2 seems to dislike the "targetengine" which sets these things to run permanently in the background.
    // MenuInst.jsx
    // An InDesign JavaScript
    @@@BUILDINFO@@@ "MenuInst.jsx" 1.0.0 1-September-2008
    // Installs menu items.
    // File needs to get dropped into the startup scripts directory
    #targetengine "session"
    // Path to where the scripts are being installed
    var setpath = "~/Library/Preferences/Adobe InDesign/Version 5.0 ME/Scripts/Scripts Panel/";
    var myScript1 = new File(setpath + "ScriptName.jsx");
    var myScriptAction1 = app.scriptMenuActions.add("Menu Text");
    var myEventListener1 = myScriptAction1.eventListeners.add("onInvoke", myScript1, false);
    var myScript2 = new File(setpath + "ScriptName2.jsx");
    var myScriptAction2 = app.scriptMenuActions.add("Menu Text 2");
    var myEventListener2 = myScriptAction2.eventListeners.add("onInvoke", myScript2, false);
    var myScript3 = new File(setpath + "ScriptName3.jsx");
    var myScriptAction3 = app.scriptMenuActions.add("Menu Text 3");
    var myEventListener3 = myScriptAction3.eventListeners.add("onInvoke", myScript3, false);
    var myScript4 = new File(setpath + "ADifferentMenu.jsx");
    var myScriptAction4 = app.scriptMenuActions.add("Other Menu Text");
    var myEventListener4 = myScriptAction4.eventListeners.add("onInvoke", myScript4, false);
    try{
    var myScriptMenu = app.menus.item("$ID/Main").submenus.item("First Menu");
    myScriptMenu.title;
    catch (myError){
    var myScriptMenu = app.menus.item("$ID/Main").submenus.add(First Menu");
    try{
    var myScriptMenu2 = app.menus.item("$ID/Main").submenus.item("Second Menu");
    myScriptMenu2.title;
    catch (myError){
    var myScriptMenu2 = app.menus.item("$ID/Main").submenus.add("Second Menu");
    var myScriptMenuItem1 = myScriptMenu.menuItems.add(myScriptAction1);
    var myScriptMenuItem2 = myScriptMenu.menuItems.add(myScriptAction2);
    var myScriptMenuItem3 = myScriptMenu.menuItems.add(myScriptAction3);
    var myScriptMenuItem4 = myScriptMenu2.menuItems.add(myScriptAction4);

  • How to have automatic resizing of container when JInternalFrame resizes?

    Is there a good way for the automatic resizing of its container when a JInternalFrame is resized?
    The intent is to have the JTree below, automatically resize. for example,
    if you type newlines into the JTextArea contained in JInternalFrames.
    (Tried adding the JInternalFrames to a JDesktopPane, but it did not display them. I wonder if it is inefficient to have a JDesktopPane for each tree node).
    Is there any way to know if a JInternalFrame is resizing? Perhaps then one can reload the tree as:
    treeModel.reload()thanks,
    Anil
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.util.EventObject;
    import javax.swing.BorderFactory;
    import javax.swing.Box;
    import javax.swing.JDesktopPane;
    import javax.swing.JFrame;
    import javax.swing.JInternalFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTabbedPane;
    import javax.swing.JTextArea;
    import javax.swing.JToggleButton;
    import javax.swing.JTree;
    import javax.swing.UnsupportedLookAndFeelException;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellEditor;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreeSelectionModel;
    public class TreeFrames extends JPanel {
           AnilTreeCellRenderer3 atcr;
           AnilTreeCellEditor4 atce;
           DefaultTreeModel treeModel;
           JTree tree;
         public TreeFrames() {
                super(new BorderLayout());
                   treeModel = new DefaultTreeModel(null);
                   tree = new JTree(treeModel);
                  tree.setEditable(true);
                   tree.getSelectionModel().setSelectionMode(
                             TreeSelectionModel.SINGLE_TREE_SELECTION);
                   tree.setShowsRootHandles(true);
                  tree.setCellRenderer(atcr = new AnilTreeCellRenderer3());
                  tree.setCellEditor(atce = new AnilTreeCellEditor4(tree, atcr));
                   JScrollPane scrollPane = new JScrollPane(tree);
                   add(scrollPane,BorderLayout.CENTER);
         public void setRootNode(DefaultMutableTreeNode node) {
              treeModel.setRoot(node);
              treeModel.reload();
           public static void main(String[] args) throws ClassNotFoundException,
           InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{
                TreeFrames tb = new TreeFrames();
                tb.setPreferredSize(new Dimension(800,600));
                  JFrame frame = new JFrame("Tree Windows UI Failed");
                  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  frame.setContentPane(tb);
                  frame.setSize(800, 600);
                  frame.pack();
                  frame.setVisible(true);
                  tb.populate();
         private void populate() {
              TextAreaNode3 r = new TextAreaNode3(this);
              setRootNode(r);
              r.gNode.addFrame();
              r.gNode.addFrame();
              TextAreaNode3 a = new TextAreaNode3(this);
              a.gNode.addFrame();
              treeModel.insertNodeInto(a, r, r.getChildCount());
              treeModel.reload();
    class AnilTreeCellRenderer3 extends DefaultTreeCellRenderer{
         TreeFrames panel;
    DefaultMutableTreeNode currentNode;
      public AnilTreeCellRenderer3() {
         super();
    public Component getTreeCellRendererComponent
       (JTree tree, Object value, boolean selected, boolean expanded,
       boolean leaf, int row, boolean hasFocus){
         TextAreaNode3 currentNode = (TextAreaNode3)value;
         NodeGUI4 gNode = (NodeGUI4) currentNode.gNode;
        return gNode.hBox;
    class AnilTreeCellEditor4 extends DefaultTreeCellEditor{
      DefaultTreeCellRenderer rend;
      public AnilTreeCellEditor4(JTree tree, DefaultTreeCellRenderer r){
        super(tree, r);
        rend = r;
      public Component getTreeCellEditorComponent(JTree tree, Object value,
       boolean isSelected, boolean expanded, boolean leaf, int row){
        return rend.getTreeCellRendererComponent(tree, value, isSelected, expanded,
         leaf, row, true);
      public boolean isCellEditable(EventObject event){
        return true;
    * this is done to keep gui separate from model - as in MVC.
    * not necessary.
    * @author juwo
    class NodeGUI4 {
         JPanel notes = new JPanel();
         final TreeFrames view;
         Box hBox = Box.createHorizontalBox();
         final JTextArea textArea = new JTextArea( 1, 5 );
         NodeGUI4( TreeFrames view_ ) {
              this.view = view_;
              hBox.add( textArea );
              textArea.setBorder( BorderFactory.createMatteBorder( 0, 0, 1, 0, Color.GREEN )
              hBox.add(notes);
              hBox.setBorder( BorderFactory.createMatteBorder( 5, 5, 5, 5, Color.CYAN ) );
         void addFrame() {
            MyInternalFrame frame = new MyInternalFrame();
            frame.add(new JTextArea(1,5));
            frame.setVisible(true); //necessary as of 1.3
            notes.add(frame);
            try {
                frame.setSelected(true);
            } catch (java.beans.PropertyVetoException e) {}
    class TextAreaNode3 extends DefaultMutableTreeNode {
         NodeGUI4 gNode;
         TextAreaNode3(TreeFrames view_t) {
              gNode = new NodeGUI4(view_t);
    class MyInternalFrame extends JInternalFrame {
        static int openFrameCount = 0;
        static final int xOffset = 0, yOffset = 0;
        public MyInternalFrame() {
            super("Document #" + (++openFrameCount),
                  true, //resizable
                  true, //closable
                  true, //maximizable
                  true);//iconifiable
            //...Create the GUI and put it in the window...
            //...Then set the window size or call pack...
            setSize(300,300);
            //Set the window's location.
            setLocation(xOffset*openFrameCount, yOffset*openFrameCount);
            this.putClientProperty("JInternalFrame.isPalette", Boolean.TRUE);
    }

    I think this does what you want; it's basically the same technique as we used before.
    It also suffers from an interesting bug: if I type in the text area inside the internal frame, the editor resizes nicely
    with the node below it staying visible; if I type in the text area next to the panel, the editor will resize over the node
    below it. I didn't dig into it further to see the cause.
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Insets;
    import java.awt.Rectangle;
    import java.awt.event.ComponentAdapter;
    import java.awt.event.ComponentEvent;
    import java.util.EventObject;
    import javax.swing.BorderFactory;
    import javax.swing.Box;
    import javax.swing.JFrame;
    import javax.swing.JInternalFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.JTree;
    import javax.swing.UnsupportedLookAndFeelException;
    import javax.swing.event.DocumentEvent;
    import javax.swing.event.DocumentListener;
    import javax.swing.plaf.basic.BasicTreeUI;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellEditor;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreePath;
    import javax.swing.tree.TreeSelectionModel;
    public class TreeFrames extends JPanel {
         AnilTreeCellRenderer3 atcr;
         AnilTreeCellEditor4 atce;
         DefaultTreeModel treeModel;
         JTree tree;
         public TreeFrames() {
              super( new BorderLayout() );
              treeModel = new DefaultTreeModel( null );
              tree = new JTree( treeModel );
              tree.setUI( new TextAreaTreeUI() );
              tree.setEditable( true );
              tree.getSelectionModel().setSelectionMode( TreeSelectionModel.SINGLE_TREE_SELECTION );
              tree.setShowsRootHandles( true );
              tree.setCellRenderer( atcr = new AnilTreeCellRenderer3() );
              tree.setCellEditor( atce = new AnilTreeCellEditor4( tree, atcr ) );
              JScrollPane scrollPane = new JScrollPane( tree );
              add( scrollPane, BorderLayout.CENTER );
         public void setRootNode( DefaultMutableTreeNode node ) {
              treeModel.setRoot( node );
              treeModel.reload();
         public static void main( String[] args ) throws ClassNotFoundException, InstantiationException,
                   IllegalAccessException, UnsupportedLookAndFeelException {
              TreeFrames tb = new TreeFrames();
              tb.setPreferredSize( new Dimension( 800, 600 ) );
              JFrame frame = new JFrame( "Tree Windows UI Failed" );
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              frame.setContentPane( tb );
              frame.setSize( 800, 600 );
              frame.pack();
              frame.setVisible( true );
              tb.populate();
         private void populate() {
              TextAreaNode3 r = new TextAreaNode3( this );
              setRootNode( r );
              r.gNode.addFrame();
              r.gNode.addFrame();
              TextAreaNode3 a = new TextAreaNode3( this );
              a.gNode.addFrame();
              treeModel.insertNodeInto( a, r, r.getChildCount() );
              treeModel.reload();
         private static class AnilTreeCellRenderer3 extends DefaultTreeCellRenderer {
              TreeFrames panel;
              DefaultMutableTreeNode currentNode;
              public AnilTreeCellRenderer3() {
                   super();
              public Component getTreeCellRendererComponent( JTree tree, Object value, boolean selected, boolean expanded,
                        boolean leaf, int row, boolean hasFocus ) {
                   TextAreaNode3 currentNode = (TextAreaNode3) value;
                   NodeGUI4 gNode = (NodeGUI4) currentNode.gNode;
                   return gNode.hBox;
         private static class AnilTreeCellEditor4 extends DefaultTreeCellEditor {
              DefaultTreeCellRenderer rend;
              public AnilTreeCellEditor4( JTree tree, DefaultTreeCellRenderer r ) {
                   super( tree, r );
                   rend = r;
              public Component getTreeCellEditorComponent( JTree tree, Object value, boolean isSelected, boolean expanded,
                        boolean leaf, int row ) {
                   return rend.getTreeCellRendererComponent( tree, value, isSelected, expanded, leaf, row, true );
              public boolean isCellEditable( EventObject event ) {
                   return true;
          * this is done to keep gui separate from model - as in MVC. not necessary.
          * @author juwo
         private static class NodeGUI4 {
              JPanel notes = new JPanel();
              final TreeFrames view;
              Box hBox = Box.createHorizontalBox();
              final JTextArea textArea = new JTextArea( 1, 5 );
              NodeGUI4( TreeFrames view_ ) {
                   this.view = view_;
                   hBox.add( textArea );
                   textArea.setBorder( BorderFactory.createMatteBorder( 0, 0, 1, 0, Color.GREEN ) );
                   hBox.add( notes );
                   hBox.setBorder( BorderFactory.createMatteBorder( 5, 5, 5, 5, Color.CYAN ) );
                   DocumentListener dl = new DocumentListener() {
                        public void insertUpdate( DocumentEvent de ) {
                             resizeEditor();
                        public void removeUpdate( DocumentEvent de ) {
                             resizeEditor();
                        public void changedUpdate( DocumentEvent de ) {
                   textArea.getDocument().addDocumentListener( dl );
              void addFrame() {
                   MyInternalFrame frame = new MyInternalFrame();
                   frame.getContentPane().add( new JTextArea( 1, 5 ) );
                   frame.setVisible( true ); // necessary as of 1.3
                   notes.add( frame );
                   try {
                        frame.setSelected( true );
                   } catch ( java.beans.PropertyVetoException e ) {
                   frame.addComponentListener( new ComponentAdapter() {
                        public void componentResized( ComponentEvent e ) {
                             resizeEditor();
              private void resizeEditor() {
                   TreePath path = view.tree.getEditingPath();
                   if ( path != null ) {
                        Rectangle nodeBounds = ( (BasicTreeUI) view.tree.getUI() ).getPathBounds( view.tree, path );
                        Dimension editorSize = getEditorPreferredSize();
                        hBox.setBounds( nodeBounds.x, nodeBounds.y,
                                  editorSize.width, editorSize.height );
                        hBox.validate();
                        Rectangle visRect = view.tree.getVisibleRect();
                        view.tree.paintImmediately( nodeBounds.x, nodeBounds.y,
                                  visRect.width + visRect.x - nodeBounds.x,
                                  editorSize.height );
                        ( (TextAreaTreeUI) view.tree.getUI() ).resizeTree( path );
              private Dimension getEditorPreferredSize() {
                   Insets insets = hBox.getInsets();
                   Dimension boxSize = hBox.getPreferredSize();
                   Dimension taSize = textArea.getPreferredSize();
                   Dimension nSize = notes.getPreferredSize();
                   int height = taSize.height + nSize.height + insets.top
                             + insets.bottom;
                   int width = taSize.width + nSize.width;
                   if ( width < boxSize.width )
                        width += insets.right + insets.left + 3; // 3 for cursor
                   return new Dimension( width, height );
         private static class TextAreaNode3 extends DefaultMutableTreeNode {
              NodeGUI4 gNode;
              TextAreaNode3( TreeFrames view_t ) {
                   gNode = new NodeGUI4( view_t );
         private static class MyInternalFrame extends JInternalFrame {
              static int openFrameCount = 0;
              static final int xOffset = 0, yOffset = 0;
              public MyInternalFrame() {
                   super( "Document #" + ( ++openFrameCount ), true, // resizable
                             true, // closable
                             true, // maximizable
                             true );// iconifiable
                   // ...Create the GUI and put it in the window...
                   // ...Then set the window size or call pack...
                   setSize( 300, 300 );
                   // Set the window's location.
                   setLocation( xOffset * openFrameCount, yOffset * openFrameCount );
                   this.putClientProperty( "JInternalFrame.isPalette", Boolean.TRUE );
         private class TextAreaTreeUI extends BasicTreeUI {
              public void resizeTree( TreePath path ) {
                  treeState.invalidatePathBounds(path);
                  updateSize();
    }

  • Automatic resizing of Window

    I've created a window that let's the user know that a child transaction
    is being started. I add three dots to a TextGraphic widget message
    until the child task is started. However, the window pane automatically
    gets bigger every time the three dots are added (using a TickInterval
    parameter). I tried coding the widget as a size of explicit, but then
    the dots aren't added. I also tried setting the autosize enabled option
    on the Window property to off, but this hasn't seemed to help. I've
    sized the window with more than enough room for the extra dots, but the
    window still gets resized each time. I am using the UpdateFromData
    method to update the window.
    I want the dots to be added with the window pane resizing itself
    everytime.
    Any help would be appreciated.
    Thanks,
    Dave
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    I want the dots to be added with the window pane resizing itselfeverytime. <<
    Don't you mean **without resizing** ?
    I tried coding the widget as a size of explicit <<This should work, but you will have to manually re-size the TextGraphic
    on the window to a sufficient width.
    An alternative would be to group this widget into a panel and then
    re-size the panel to a sufficient width and set the panel size policy to
    explicit (default).
    Hope this helps.
    Prashant.
    From: Ehrlich, Dave[SMTP:[email protected]]
    Reply To: Ehrlich, Dave
    Sent: Monday, August 10, 1998 3:02 PM
    To: Forte Users Group (E-mail)
    Subject: Automatic resizing of Window
    I've created a window that let's the user know that a child
    transaction
    is being started. I add three dots to a TextGraphic widget message
    until the child task is started. However, the window pane
    automatically
    gets bigger every time the three dots are added (using a TickInterval
    parameter). I tried coding the widget as a size of explicit, but then
    the dots aren't added. I also tried setting the autosize enabled
    option
    on the Window property to off, but this hasn't seemed to help. I've
    sized the window with more than enough room for the extra dots, but
    the
    window still gets resized each time. I am using the UpdateFromData
    method to update the window.
    I want the dots to be added with the window pane resizing itself
    everytime.
    Any help would be appreciated.
    Thanks,
    Dave
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Menubar doesn't automatically resize, using scene builder

    Hi,
    I started playing around with the new scene builder. I love it!
    In the past I added the menubar into the top area of a border pane. If I resized the window to full screen, the menubar also automatically resized to full screen.
    It seems to me that scene builder doesn't support a border pane (scene builder use anchor pane).
    This is how it looks like if I resize the window:
    |__Menu__!
    |     
    |_______________
    And it should look like this:
    |__Menu_________!
    |     
    |_______________

    @Josef
    BorderPane support will be added in an upcoming Developer Preview build.
    In the mean-time, you can anchor the MenuBar:
    Select the MenuBar, go the Layout part of the Inspector and click on the Left and Right Anchors in the AnchorPane Constraints to activate them.

  • Automatic Resize on Restore from Start Tab

    I am supprised how apple made safari compatible with Xp
    I love using it, only 1 thing i appreciate if added to the release of safari 3, that we can go to preference and set the automatic resize function off, or give us options of always maximized, therefore we dont need to maximize the browser to see wt we want after restoring back from the start tab.

    Safari is shrinking itself everytime i restore from the Windows Start tab!!!
    How do you make it stop shrinking?

  • How do I get my ipod to play a playlist from reverse order? (Start with recently added song instead of first added)

    How do I get my ipod to play a playlist from reverse order? (Start with recently added song instead of first added)
    So I'm adding new songs to a very old playlist? Is there anyway that when I add them, they automatically go to top of playlist? How about getting one song to the top of a playlist.  That drag to arrange function is very annoying because it is slow and the playlist does not scroll up very well on a PC.

    Make a new playlist by pressing the little plus button at the very lower left corner of iTunes. An new playlist will appear in the Source pane called "untitled playlist". While the name is highlighted, you can change it to whatever you want. Drag all of the tracks from all the albums that comprise a single book to that playlist. Sync that playlist to your iPod.

  • When opening my Outlook 2010 with new added e-mail account with Exchange Server, I have to click manually on my standard e-mail account for checking mail

    When opening my Outlook 2010 with new added e-mail account with Exchange Server supplied by my employer, I have to click manually on my standard e-mail account for checking mail. Do I have to upgrade my Microsoft Office 2010 or how can I make my Outlook
    2010 check all my four e-mail accounts without manually click on my accounts?
    Sincerely
    Ketil Hothorp

    Hello Ketil,
    Good Day...
    Seems to be the Issue is Syncing emails, now I would recommend you to Remove and Add the Account and try and check if the emails are getting synced automatically.
    Hope this is with Single User. If it is with Multiple Users then we need to check the permissions assigned.
    Regards,
    Praveen

  • Displaying custom drawn panels in a panel with FlowLayout vs GridLayout

    I am having trouble to display my custom panels(on which I have drawn) in another panel with FlowLayout. When I use this layout only a small part of their top-left corner appears, when using the GridLayout they are displayed as should, all. Why is this? Is there any way around it?
    The following is the code:
    package diagramillustrator;
    import java.awt.*;
    import java.util.Vector;
    import javax.swing.*;
    public class ClassDiagram extends JPanel
        //fields
        //<editor-fold>
        //general info
        public String title = "class";
        public String name;
        public Vector interfaces;
        public Vector exceptions;
        public String superclass;
        public Vector subClasses;
        public boolean superClass;
        public boolean subClass;
        public String dPackage;
        public String dExtends;
        //variables
        public FieldStructure field;
        //methods
        public MethodStructure constructor;
        public MethodStructure metho;
        //</editor-fold>
        /** Creates a new instance of ClassDiagram */
        public ClassDiagram()
            super();
            super.setSize(132,75);
        protected void paintComponent(Graphics g)
           setBackground(Color.WHITE);
           Graphics2D g2d = (Graphics2D) g;
           super.paintComponent(g2d);
           g2d.setStroke(new BasicStroke(2f));
           g2d.drawRect(1,1,132,25);
           g2d.setFont(new Font("arial", Font.BOLD, 12));
           g2d.drawString(title, 4,18);
           g2d.setColor(Color.LIGHT_GRAY);
           g2d.fillRect(1,25,132,25);
           g2d.setColor(Color.BLACK);
           g2d.drawRect(1,25,132,25);
           g2d.setColor(Color.WHITE);
           g2d.fillRect(1,51,132,25);
           g2d.setColor(Color.BLACK);
           g2d.drawRect(1,50,132,25);
        public static void main(String[] args)
            JFrame f = new JFrame("Testing ClassDiagram");
            f.setSize(500,400);
            //layout shows it correctly
            JPanel panel1 = new JPanel(new GridLayout());
            //layout shows it incorrectly
            //JPanel panel1 = new JPanel(new FlowLayout());
            panel1.setSize(200,200);
            ClassDiagram c1 = new ClassDiagram();
            ClassDiagram c2 = new ClassDiagram();
            ClassDiagram c3 = new ClassDiagram();
            panel1.add(c1);
            panel1.add(c2);
            panel1.add(c3);
            f.add(panel1);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.show();
    }Here is the main method included in the class(the main method is used for testing here) where the adding etc is done.
    public static void main(String[] args)
            JFrame f = new JFrame("Testing ClassDiagram");
            f.setSize(500,400);
            //layout shows it correctly
            JPanel panel1 = new JPanel(new GridLayout());
            //layout shows it incorrectly
            //JPanel panel1 = new JPanel(new FlowLayout());
            panel1.setSize(200,200);
            ClassDiagram c1 = new ClassDiagram();
            ClassDiagram c2 = new ClassDiagram();
            ClassDiagram c3 = new ClassDiagram();
            panel1.add(c1);
            panel1.add(c2);
            panel1.add(c3);
            f.add(panel1);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.show();
        }Please help.
    Thanks,
    AndXer

    Layout managers.
    JPanel panel1 = new JPanel(new GridLayout());GridLayout divides the availabale space into equal cells and expands each child component to fill the cell.
    JPanel panel1 = new JPanel(new FlowLayout());FlowLayout attempts to show each child component at its preferred size. The preferredSize is determined by the layout manager in the process of laying out the children. For a graphic component, ie, a component with no child components, the request for the components preferredSize will return the default size which is 10,10 for JPanel. Therefore you will need to either set the preferredSize for the gtaphic component or override the getPreferredSize method and return the desired Dimension. Another limitation of FlowLayout is that it attempts to lay its children out in&#8211;line.
    GridBagLayout also respects the preferredSize of child components and offers more versatility.
    import java.awt.*;
    import javax.swing.*;
    public class CD extends JPanel
        public String title = "class";
        public CD()
            super();
            setPreferredSize(new Dimension(132,75));
            setBackground(Color.WHITE);
        protected void paintComponent(Graphics g)
            Graphics2D g2d = (Graphics2D) g;
            super.paintComponent(g2d);
            g2d.setStroke(new BasicStroke(2f));
            g2d.drawRect(1,1,130,25);
            g2d.setFont(new Font("arial", Font.BOLD, 12));
            g2d.drawString(title, 4,18);
            g2d.setColor(Color.LIGHT_GRAY);
            g2d.fillRect(1,25,130,25);
            g2d.setColor(Color.BLACK);
            g2d.drawRect(1,25,130,25);
            g2d.setColor(Color.WHITE);
            g2d.fillRect(1,51,130,25);
            g2d.setColor(Color.BLACK);
            g2d.drawRect(1,50,130,25);
        public static void main(String[] args)
            JPanel panel1 = new JPanel(new GridBagLayout());
            // This has little affect until after realization and
            // is then subject to its parent layout manager. Use
            // the preferredSize for better results.
            //panel1.setSize(200,200);
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.insets = new Insets(5,5,5,5);
            gbc.weightx = 1.0;
            gbc.weighty = 1.0;
            // Add some components
            int n = 5;
            // and specify columns
            int cols = 3;
            for(int j = 0; j < n; j++) {
                gbc.gridwidth = ((j+1) % cols == 0) ? GridBagConstraints.REMAINDER
                                                    : 1;
                panel1.add(new CD(), gbc);
            JFrame f = new JFrame("Testing ClassDiagram");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.add(panel1);
            f.setSize(500,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • Scrolling slow in a panel with 300 images

    Hi,
    I am using a panel which contains about 300 images (small icons).
    I covered this panel with a scroller, and when scrolling, it's very slow.
    when there are less images (about 50), it scrolls smoothly.
    Any suggestions ?
      <s:Panel id="src"
                                   skinClass="SrcSkin"
                                   dragEnter="trashDragEnterHandler(event);"
                                   dragDrop="trashDragDropHandler(event);"
                                   bottom="{bottomBar.height}" width="100%" >
                        <s:Scroller width="100%" height="100%" id="srcScroller" >
                                  <s:Group width="100%" height="100%" id="aaa" verticalCenter="0">
                        ADDING 300 IMAGES HERE AT RUNTIME....
                                            <s:layout>
                                                      <s:TileLayout verticalGap="-50" horizontalGap="11" />
                                            </s:layout>
                                  </s:Group>
                        </s:Scroller>
              </s:Panel>

    Try using a list with itemrenderer for image. Scrolling performance will imporve as the list recycles its renderers.

  • I have a 64GB iPad2 and selected to "Automatically fill free space with songs".... will it have to download that 60GB of music to my ipad everytime I sync?  It took about 8 hours to sync the music to it

    I have a 64GB iPad2 and selected to "Automatically fill free space with songs".... will it have to download that 60GB of music to my ipad everytime I sync?  It took about 8 hours to sync the music to it.
    I did this last night at 10pm thinking it would take 30 minutes to sync these 10,000 songs or so to my ipad to take up the 64 GB.  I went to bed because it was taking so long and woke up at 6am and it was just about to finish.  It finished around 630am.  So it took a good 8 hours to sync.
    I unhooked it and used it for an hour or so and then hooked it backup so that I could update a few apps on it.  When i did that it acted like it was re-adding all of those songs again and it took about 8 hours again to sync all the music.  Was that just a fluke because I made changes to the ipad?  or will it always calculate and then re-sync alllllllllllllllllll of those 10,000 songs?
    Thanks so much for any help!!!
    -Michael

    Anyone?

Maybe you are looking for

  • Copied files to USB HDD - now can't find them!

    I had to reinstall my wife's macbook so I backed up all her files to a USB HDD formatted as MS-DOS (FAT) [according to disk utility] I then reinstalled and tried to find the files which do not show up on the USB HDD (shoulda checked!) I've seen posts

  • Speeding up audio with Time Stretch for FCP

    Hello Everyone. I have an audio clip that I send to Studio Pro via Final Cut Pro through File>send to>Soundtrack Pro Audio File. The clip is 29:24:08 in Final Cut. I need it to shrink to 29:22:23 in order to sync up with some video. In S.P. I use the

  • Printing from my MacBook Pro w/ Brother HL-1440 takes forever ... or doesn't happen at all

    Hello, Sometimes, I can print just fine, but other times, even very short jobs (2-4 pages, in .doc or pdf format) take a long, long time in the print queue, and may not print at all -- Can someone please let me know how I can make my MacBook Pro work

  • Illustrator CS6 EPS 10 Problem

    Hello, i have a problem whis Illustrator CS6 and EPS 10! i need to save my files in eps10 for (istock, shutterstock) but its always the same problem "The Files are not EPS10" and can not be opened! can someone help me! Thanks

  • Set value of multiselect property

    Hi, I have created a multiselect metadata property. How can I set its value programmatically?