Keeping "child" objects aligned relative to "parent" objects - Possible?

Hello,
I have an object (e.g. a circle) and I have some text that I would like to remain center-aligned horizontally and vertically to the center of the circle, even if I cange the font or size of the text, or add a newline (make it two or three lines of text rather than one).
Right now I have to realign the text to the object each time I change the text. I'd like to be able to "lock" the alignment of the text (or any other object) to some other object. Can I get this result (or close to it) somehow? I have to make frequent changes like this, and the extra realignement step after each change is a productivity killer for me.
Thanks for your wisdom,
Ben

Thanks for the help so far, I appreciate it!
I think I will likley have to go the action or scripting route.  Setting an object's origin relative to that of another object seems like what I want to do, but the example I gave was really an oversimplification of my situation, and the text and circle of my example are really more complicated objects and groups of objects (including text) in the actual case, so I don't think the convert to ellipse solution will be quite robust enough. I'm going to fiddle with that method a bit to see if it might be adapted to the general case; it involves a few features I didn't know about so thanks for the education regardless. Otherwise, if there is no general way of linking one object's coordinate system to another object's center, creating an action or script will at least eliminate a few mouse clicks.
Thanks again both of you,
Ben

Similar Messages

  • Move child movie clip from one parent object to another

    Hi everyone,
    I am somewhat new to AS3, and I'm having a hard time working out the most appropriate way to move a child movieclip between parent objects.
    I'm creating a board-game type game wherein I've dynamically created an array of 'Square' movieclips, with no visual elements, which are arranged in a 10x10 rectangle on the stage. I then dynamically add the appropriate types of piece movieclips to the various squares with the addChild() method. In general, a square should only have one child piece at a time.
    All of this works well for setting up the play area, but now I'm having an issue with moving a piece from one square to another. I want to have the user click a square with a piece on it, then click the destination square to move the piece. I have the logic for determining where a user can move any given piece to, but I don't know how to actually move the piece.
    The pieces are all different class objects that extend both a base class I call Piece as well as the MovieClip class. The main issue is that when dynamically adding the various pieces to the squares, I don't provide them a unique name to access them later. I don't bother with unique names because I have no way of knowing which piece instance will be in a given square, so using getChildByName(name:String) isn't very useful.
    So I can think of two routes that I can take: Making a getter/setter for the Square class that manages a private Piece property (as well as the adding and removing of the child piece to/from the parent square), or using getChildAt(index:int) to try to access the child piece.
    I want to go with the first route as it seems to be the most maintainable to me. My problem is that I can't work out how to manage empty squares in this scenario. My instinct is to null to private _piece property of one square once I've moved the child piece instance to another square... but I'm fairly certain that the private property is a reference type, and nulling it out will null the actual piece object even after it's changed parents.
    I'm sorry for the long description. I'm hoping that my lack of experience with as3 it what's causing my trouble, and that someone more well versed will know of the best way to handle this. Maybe I'm overthinking everything.
    If something isn't clear, please feel free to ask me for clarification. I would appeciate any help that anyone may be able to offer.
    Thanks!
    - Scott

    for a square with a child, you can use:
    whateversquare.getChildAt(0);  // to reference whateversquare's only child.  although, if there are graphics in whateversquare, you may need to use getChildAt(1)
    or, if you want to use a square class getter/setter, what's the problem?  an empty square will return null.

  • Is it possible to view all record of child object in parent detail page.

    Hi All,
    Could someone please tell me how to view all records of child object in any associated parent detail page.
    For example, In opportunity detail page I want to see all lead associated with particular opportunity. As per standard setting I can be able to see only five lead records in opportunity detail page. Is it possible to view all lead on the same opportunity detail page instead of clicking on "show full list"
    Thanks in advance.
    Manish

    There is my code in labVIEW for the moment
    See attachments
    Dany
    Dany Allard
    Attachments:
    Exemple code SET.JPG ‏47 KB

  • Need to be enlightened on Parent, Child object assignments

    Hi!
    I am too boggled with parent class, child class objects assignments. For example say I have something like this:
    class parent{
       int a;
        void doStuff(){...}
    class child extends parent{
    int b;  
    void doOtherStuff(){...}
    }Ok. Now. if have have something like this:
    parent p;
    child c;Then which one of the below is legal and why and why not?
    1.) c = p;
    2.) p = c;
    I think p = c is legal. If so, can I do p.a =12; p.b=15;
    Why and why not?
    Please be my lifesaver.
    Thank You for reading!

    parent p;
    child c;
    If these are defined as global variables then both p and c will be null, meaning they refer nothing. Since a child inherits properties of the parent you can hold a child object using a parent reference
    so this is legal
    p = c;
    (Note: you need to understand the concept of a reference and object well. Here p and c are both references not objects).
    When you hold a child object using a parent's reference only parent's properties are visible. If you want to see the child's properties then you need to cast that reference to a child reference. So you can't say p.b=12.
    Hope you got what you want

  • Calling parent method from within child object

    Hello,
    A quick question! Is it possible to call a method in a parent object from within a child object.By child object I mean an object that was instantiated within the parent object.
    Thanks.

    A quick question! Is it possible to call a method in a
    parent object from within a child object.By child
    object I mean an object that was instantiated within
    the parent object.Since you are using ambiguous terminology, it would be much better if you provided a small sample of your code to avoid confusion. I am guessing that you are actually talking about an inner class when you say child class.
    If that is correct, then you can do something like this:
    class Parent {
      void foo() {}
      void bar() {}
      class Child {
        void foo() {}
        void test() {
          bar(); // No conflicts, just call the Parent method
          Parent.this.foo(); // Use explicit qualification to avoid conflicts.

  • How to build a query across parent and child object fields?

    As a part of an Integration Requirement, I need to query Opportunity records that have been Modified after a specific date and time?
    Now, Opportunity has a child object called ProductRevenue with a one to many relationship. Is there anyway I can construct a querypage that will fetch records whose Opportunity fields 'OR' its child ProductRevenue's fields have been modified after a specific date and time?
    I have tried using the SearchSpec argument, but it does not let me query across child object fields.
    For eg:-
    ObjOpptyQueryPageInput.ListOfOpportunity.Opportunity.searchspec = "([ModifiedDate] > '01/01/2013 00:00:00') OR ([ProductRevenueData.ModifiedDate] >= '01/01/2013 00:00:00')";
    [This above code written in C# thew me an error saying - The object Opportunity does not have an integration component called - ProductRevenueData.ModifiedDate.]
    Any help will be greatly appreciated. Thank you.

    Hi,
    As far as I know this can't be done at once because you have to consider :
    - Every Opportunity and their time-limited ProductRevenues
    AND
    - Time-limited Opportunities
    If you want to achieve this, you have to consider the 2 datasets separately and make your first query :
    ObjOpptyQueryPageInput.ListOfOpportunity.Opportunity.searchspec = "([ModifiedDate] >= '01/01/2013 00:00:00')";
    but also another query with the restriction on the ProductRevenue Searchspec.
    This shouldn't be too hard because the searchspec functionality is present at each level :
    - ListOfOpportunity -> Opportunity (the top-level that you used for your query)
    - ListOfOpportunity -> Opportunity -> ListOfProductRevenue -> ProductRevenue (the sub-level that you should use for the second query)
    Then in your C# code, you merge the 2 datasets and you end up with your expected result.
    Hope this helps,
    Charles.
    http://www.dubant.com

  • Problem creating non-persistent Child Objects

    I have the need to create a non persistable child object in the
    jdoPreStore of a parent object. I then perform some tests on the parent
    to determine if the child object needs to be persisted or not. If I leave
    the child non persistent it still writes to the database.
    I was performing the follwoing piece of code
    Class Parent {
    // The relationship is a 0 to many
    public Child createChild() {
    Child child = .....//create non persistent object
    child.setParent(this);
    getChild().add(child);
    It appears that if I remove the getChild().add(child). It does not
    persist (as desired).
    Is this correct behaviour?? I dont think that it should be, but if it is
    then I have a further problem.
    If that child object inherits from another object and you remove the
    getChild().add(child) kodo outputs an invalid object to the database. It
    doesnt insert a row to the child table. But it inserts a row to the
    childs inherited object table. This is now an invalid object and will
    fail upon loading.
    Any help on this would be appreciated.
    Thanks
    Luke.

    JDO has something called persistence by reachability. This means that
    objects do not have to explicitly be marked as to be persistent as JDO
    will traverse the object graph to ensure that all nodes are persistent.
    I think you are seeing this behavior combined with another side
    behavior: Kodo requires that both sides of a relation be set.
    Basically, keep your objects in synch (set both sides of the relation).
    And if you want to hold onto a reference to non-persistent object
    before you decide what to do with it, add a transient field or a field
    marked "persistence-modifier="none"" in your metadata and then process
    those transient fields in jdoPreStore ().
    i.e.
    if (//businessLogic is true)
    persistentField = transientField;
    Luke wrote:
    I have the need to create a non persistable child object in the
    jdoPreStore of a parent object. I then perform some tests on the parent
    to determine if the child object needs to be persisted or not. If I leave
    the child non persistent it still writes to the database.
    I was performing the follwoing piece of code
    Class Parent {
    // The relationship is a 0 to many
    public Child createChild() {
    Child child = .....//create non persistent object
    child.setParent(this);
    getChild().add(child);
    It appears that if I remove the getChild().add(child). It does not
    persist (as desired).
    Is this correct behaviour?? I dont think that it should be, but if it is
    then I have a further problem.
    If that child object inherits from another object and you remove the
    getChild().add(child) kodo outputs an invalid object to the database. It
    doesnt insert a row to the child table. But it inserts a row to the
    childs inherited object table. This is now an invalid object and will
    fail upon loading.
    Any help on this would be appreciated.
    Thanks
    Luke.
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Need an approach regarding reporting for a one-to-many primary-child relationship, where there are more than three child objects for a primary object for reporting purpose

    Business Scenario- We have a parent organization with 6 different Business Units.One BU requires 9 stages for for Opportunity(Tender) Tracking.The client requirement is to show the basic details of the tender at the header level and to show details specific to individual sales stage as different tabs.There will be multiple opportunity members added as opportunity team and will be responsible for capturing details specific to individual sales stage(tab). The Tab should be enabled and disabled based on the role. Reporting is required against each stage with specific fields of child objects against each opportunity.
    We created multiple children entities under the oportunity(one to many mapping) but we are unable to add more than 3 child objects for a primary object for reporting purpose.
    Kindly suggest what needs to be done to meet the requirement

    Can you provide the exact steps you took to  "created multiple children entities under the oportunity" ?
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • How to map between child objects in a Siebel Data Map

    Hello. I need to map a field from one child object to another child object using a Siebel Data Map.
    Specifically, I have an Integration Object set up for FINS Group Policy with 2 child components (Action and Proposal). I want to map the Proposal's name to the Activity's Description. Here's the structure:
    Policy (io)
    -Name
    -Action (io)
    --Description
    -Proposal (io)
    --PPSLFileName (this is the proposal's file name)
    I can map from the parent (Policy) to the child (Action) as follows:
    Integration Component Map: Action-to_Action
    Source Expression: [FINS Group Policy.Name]
    Target Field Name: Description
    This will map the Policy's Name to the Activity's Description.
    I tried these, but they don't work:
    1)
    Integration Component Map: Action-to_Action
    Source Expression: [FINS Group Policy.Proposal.PPSLFileName]
    Target Field Name: Description
    2)
    Integration Component Map: Action-to_Action
    Source Expression: [Proposal.PPSLFileName]
    Target Field Name: Description
    Thanks for any help

    Hi,
    For your issue,you can use the 2nd point what u hv mentioned :-
    Integration Component Map: Action-to_Action
    Source Expression: [Proposal.PPSLFileName]
    Target Field Name: Description
    But it has some limitations,i.e the child's(Proposal) cardinality should be 1 or less than 1 i.e no. of instances of Proposal IC should not exceed 1 or else the data map will error out at runtime.
    Regards,
    Sambit

  • Propagating ACLs to child objects via command line

    Hello,
    I have ACLs enabled on a volume and am applying various ACL rules on already existing directories. I use a script to do that.
    Some of these directories have sub dirs and files. The child objects do not pick that they need to inherit the rules unless I click on the "Propagate permissions" button in WGM. I have set the options 'file_inherit' and 'directory_inherit' in the parent objects.
    Does anyone know how can I propagate these ACLs down to all child objects/descendants from the command line without using WGM?
    I would prefer not to do it recursively if there is some other way of doing it. Thank you

    Nevermind, just use -R option, duh

  • Hibernate child object creation problem

    hi,
    i have two java classes named "user" and "writer"
    writer is subclass of user.
    with hibernate mapping files , i 'm mapping objects with table-per-subclass strategy...
    here is my mapping code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
    <class name="User" table="User">
    <id name="id" type="long" column="id">
    <generator class="increment"/>
    </id>
    <property name="userName" column="userName"/>
    <joined-subclass name="Writer" table="Writer">
    <key column="user_id"/>
    <set name="articles" table="writer_articles" lazy="false">
    <key column="user_id"/>
    <many-to-many column="Article_id"
    unique="true"
    class="Article"/>
    </set>
    </joined-subclass>
    </class>
    </hibernate-mapping>
    when i create a writer(child) object, writer record is inserted to two tables with the same id column.it's good.not a problem
    but when i create a user(parent) object then if i want to change role of user to writer it's a problem...
    for example:
    User user=new User(..); user is inserted to user table with id =10
    i want to save same user as a writer with same id number to writer table
    Writer writer =new Writer(..); writer must be inserted to writer table with id=10_
    in hibernate writer is inserted to writer table with different id number...
    what must i do to solve problem ??

    nobody replied about my problem...
    i searched on google and learned some information
    i think ,there is two way to resolve this issue:
    1) -delete parent record - and -create child record-
    but this could not be efficient.
    2) insert child record with same id number to child table manually (by HQL )
    Regards.

  • All child objects - WS 2.0

    Anybody knows how to query all child objects of a parent object?
    If I refer all contacts, each contact has only 10 child objects (eg CustomObject6), instead of all. Currently, if I set the ListOfCustomObject6 into ContactQuery, I only have a list of 10 CustomObject6.
    I need each contact has a full list of its child objects.

    You have to make multiple queries to return all of a particular child object. Refer to the lastpage and recordcount tags in the documentation.

  • F:invokeUrl jsp tag and child objects

    Hey all,
    Does anyone know if its possible to use the f:invokeUrl tag on a method in a child object? eg:
    <f:invokeUrl var="myObject.myChildObject" methodName="myMethod" />
    I've also tried:
    <f:invokeUrl var="${myObject.myChildObject}" methodName="myMethod" />
    with no luck. I've gotten the above to work using the f:invoke jsp tag.
    What I'm trying to do is put my ajax type functions in the objects that make the most sense. If I can't get this to work, I'll need to make presentation objects with all my ajax functions, create an instance and put it into scope, which I rather not do.
    Thanks,
    Graham

    Graham,
    I can't say if it will work or not, because its a better practice to leave all logic outside of the jsp (and I really don't know!). Do the logic in an activity, then only use the jsp to display the values. Keeping the logic outside is a much easier way to keep track of the data, and also re-use if necessary.
    Customarily, a 'view' object is created. FileStatusView for example, would be a BPM Object that contains all the values to be displayed in a JSP or presentation.
    Hope thats helpful!
    -Kevin

  • Child object as Root object - Locking issue

    Hi Folks,
    In the "MKTCPG" BOL object, there is a child object "MKTCondition". I find that "MKTCondition" is in turn a Root object in the Model browser.
    I could not lock this object "MKTCondition" for changing the entries. The lock method checks for the My Manager Entry to be locked before locking the current level object. This MKTCondition is maintained as a Root object and there is no Parent / Manager entry for this. So the lock method is not successful.
    Kindly let me know your comments regarding this...
    Regards,
    Karthi M R.

    Hi,
    Resolved at last.
    This lock and edit functionality is not as per the conventional approach for this BOL object. SAP has designed it in a different way through a GENIL service class and it was a very good exposure working in this object.
    Thank you.
    Regards,
    Karthi M R.

  • Filtering not working for newly added child objects in master-detail table

    Hi,
    I am using Jdeveloper 11.1.1.4 version.
    Problem scenario:
    Filtering of records is not working for newly created child objects in a master-detail scenario.
    Steps to reproduce this issue using HR Schema (using LOCATIONS and DEPARTMENTS table ) :
    1. Create Business components (EO's & VO's ) for LOCATIONS & DEPARTMENTS table)
    1. Create a .jspx page and insert a readonly master table of Locations
    2. Insert a child table (inline-edit table) of Departments and enable filtering
    4. For the child table, drag and drop CreateInsert operation as a toolbar button .
    5. Create a new child record using the toolbar button and enter data .
    6. Filtering on the newly created child record's attributes does not work.
    Please note that the same filter works for existing child records.
    Any suggestions for resolving this issue?
    Thanks,
    Vikas

    Found from Fusion Developer's Guide the following snippet about QBE functionality :
    "+When you create data controls, all data collections will automatically include a Named Criteria node with an All Queriable Attributes criteria. This is the default view criteria that includes all the searchable attributes or columns of the data collection. You cannot edit or modify this view criteria+. "
    So, the question is if the implicit view criteria cannot be edited, how else to set the query execution mode to "Both" ?
    Shouldn't ADF BC support this by default? Is this a bug?
    Note:- If you create a maste-detail table using POJO datacontrols, filter works correctly for newly created child records also .
    This seems to be an issue with ADF-BC datacontrols only.
    Thanks,
    Vikas

Maybe you are looking for