See this question about static object

1)static A a =new A();
2) A a1=new A();
what is the difference between them?

static A a =new A();
When this line is written in another class say : class b;
a is accessible without the need for declaring an object of b.
i.e., b.a
Not in the other case.
Many factory classes and methods are accessed this way coz, the classes are private and abstract, so u cannot make an object of that class.
For example:
System.out.println() - here println() is a method, out is an object of some class that is declared static in the class System. if it were'nt static, then we had to make an object of the System class and then access the out object,
hope this helps
let me know

Similar Messages

  • Question about using objects in SQL query.

    I had posted this question in the SQL/PLSQL forum but I guess nobody took the time to understand exactly what I am asking so I decided to try here hoping to get the answer. So here is the thing:
    I have created generic object type "tree" - the constructor takes as a parameter sql query which returns "node_id" and "parent_node_id" - this is all we need to have a tree. The object has all related to a tree structure member functions and one of them is "oldest_relative" (the tree may not be fully connected - it may be more like a set of many trees, so it's not necessary all nodes to have the same root).
    I also have departments table with the following fields: department_id, parent_department_id, department_name,...
    all records in the table w/out parent_departments (parent_department_id is null) are considered divisions.
    Now if I run the following query:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT_NAME", tree('select department_id "node_id", parent_department_id "parent_node_id" from departments').oldest_relative("DEPARTMENT_ID") "DIVISION_ID" FROM departments
    my question is: Is the tree object created for every row or does Oracle somehow caches the object since the object itself is not changing but only the parameter for the oldest_relative member function.
    The table only has a few hunderd records and I can't see much of a difference in the execution time btw the query above and query like this:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT_NAME", b.t.oldest_relative("DEPARTMENT_ID") "DIVISION_ID"
    FROM departments left join (select tree('select department_id "node_id", parent_department_id "parent_node_id" from departments') t from dual) b on 1 = 1
    where the object is clearly created just ones. (there is probably a better way to do it instead of this join)
    Pls elaborate
    George

    Not exactly sure what the question is...
    As I understand, you are comparing the following two constructor calls:
    +select..  tree('select department_id "node_id", parent_department_id "parent_node_id" from departments').oldest_relative("DEPARTMENT_ID") ... FROM ...+
    +select tree('select department_id "node_id", parent_department_id "parent_node_id" from departments') ... FROM dual+
    These calls are the same (besides the 1st one doing an immediate implicit call to a method of the object being constructed). The number of times these are being called depends on the number of times this SQL projection is applied - and that is determined by the number of rows being projected by the SELECT.
    The latter one is against DUAL which only has a single row. So that constructor is only called once. The former can be against multiple rows. Obviously a single pass through a data set is desirable - which means that the sub-select (use by the constructor) should ideally only be executed once and makes the 2nd method more desirable.
    However, I'm having a hard time understanding why the class and constructor are at all needed. Why pull data from a SQL table into PL memory? As that is where the class will need to cache and store the results of that construction parameter SQL SELECT. And once in PL memory, how does the object effectively access, search and use this cached data?
    PL memory is expensive. It is not sharable.
    PL data structures are primitive - these cannot be compared to SQL structures in the form of tables and columns that can be stored in a number of physical ways (index tables, hash tables, partitioned tables, clustered tables, etc). Cannot be indexed like SQL structures using B+tree, bitmap, function and other indexing methods. Cannot be sorted, grouped, analysed, filtered, etc like SQL structured data.
    It makes very little sense to read SQL data into a class and then deal with that data, cached in expensive PL memory, using primitive PL structures.
    And the same would be true if Java or C# was used. The best place for data is inside the SQL engine. That is the most superior environment for data. It can processes more data, scale better, perform better and offer more flexibility, than pulling data from it and then crunch that data using PL or Java or C#.

  • Management needs to address this question about Creative Cloud subscriptions

    Hopefully there is a satisfactory solution for this question.  Then and only then will I feel comfortable giving Creative Cloud a try.  I own Production Premium CS5.5 and Design Premium CS6. In addition I have stand alones of Photoshop CS5.1, Premiere Pro CS6, Acrobat Pro 9, Lightroom 4 (2 copies) and probably another package I'm not thinking about right now.  If I convert to Creative Cloud and two years from now when CS7 or possible CS8 is the current version and I decide end my subscription to Creative Cloud reverting back to the disk version ownership, I will be required to pay additional money because I didn't keep my disk ownership current.  I used to upgrade my Production Premium Suite every other version.  I owned CS4 in that suite and when CS5.5 was released, I was required to pay an additional $250 (if memory is correct) because I hadn't upgraded to Version CS5.  I think that subscribing to Creative Cloud should not open me up to my license being devalued because I chose the subscription (at essentially the same price for what I use) over buying the disk.  Adobe, will you comment on this situation and add it to management discussions to assure faithful customers we won't have our current licenses put into jeopardy? 

    akrafter wrote:
    I like the idea of Creative Cloud but subscribing to it for a mandatory 1-year is binding.
    Thare are two joining options: monthly (higher monthly fee) or 12 month contract, billed monthly(lower monthly fee)
    akrafter wrote:
    And after the one year, do you go on a month-to-month or do you have to sign on for another year?  I'm sure that's in the fine print someplace but I haven't noticed it.
    Auto-renewed unless you cancel.
    http://www.adobe.com/au/products/creativecloud/faq.html
    At the end of my annual membership, what do I need to do to renew it?
    If you would like to renew your annual membership for another year, you do not need to do anything. Your account is set to auto-renew so that you will not experience any interruption in access to your Creative Cloud products and services.
    How do I cancel my one-year membership?
    To cancel a one-year membership, you can either go online to the Account page on www.creativecloud.com or contact Adobe Customer Service. If you cancel your membership before meeting the 12-month commitment date, you will be charged 50% of the remaining amount left on your contract.
    akrafter wrote:
    I hope a lot more people ask the question and do as I'm doing, not buy into Creative Cloud until a satisfactory solution is arrived at.  I like the looks of the CC package and I think it has value but not at the loss of value for my Creative Suite.
    Not sure you'll get a definitive answer to that before CS7 arrives.
    And you'll need a CS6 perpetual license in order to upgrade to CS7.
    So I suspect a CS6 purchasing/upgrading decision (Cloud or traditional upgrade) will have to be made based on the info currently available.

  • Where should i direct this question about dashboard and widgets?

    i have a question about the dashboard and widgets, but i have no clue where to ask?
    thanks.

    Hi,
    I advise you to use http://discussions.apple.com/forum.jspa?forumID=751 which is the area for dashboard
    volker

  • Questions about smart objects in CS3-CS5.

    Hi.
    Two questions.
    When I replace content of smart object in CS2 the content takes the size of previous state of smart object in pixels.
    It was very useful when need to replace some background to another and it autoresized to the new size and proportion.
    For example, when I replace content of smart object with external size 100x90px and 100x90% proportion (can see with Ctrl-T) with file with 200x300px size, i have new smart object with old size 100x90px and new proportion 50x30%.
    When I try to do the same in CS3-CS5 I get smart object with size 160x216px and proportion 100x90%.
    Haw can I return the old behaviour?
    Second.
    In CS2 I use files with a lot of smart objects each of them may consists with some others smart objects and so on.
    But i can`t use this scheme in CS3-CS5 because of very high consumption of scratch memory.
    Very-very simple example. In CS2 create file 4000x3000px, create new layer and draw there black square 300x300px.
    Convert the "square" layer to smart object. Then duplicate it with Ctlt-J 30 times. Save the file and reopen.
    The scratch size is about 280 MB and practically not changing when moving layers with movetool.
    Open this file in CS5. The scratch size is about 2.5 GB and quickly increase to 5 GB and above when i try to move layers. And this is a very simple file.
    If i will try to open several such files in CS5 the amount of useing memory will be fantastic.
    Why there is such behaviour whis memory in cs3-cs5 photoshops?
    PS. sorry for my english. hope you understand me.

    Hi,
    What version of Ps and AI are you using?
    1. In Ps, there's no controls for the AI layer visibilty, but the visibility attributes should be respected.
    2. The placed file is an embedded copy, not a link to an external file. However, there is a script that you might find useful for your purposes. I'm not sure if the Win support improved with CS5.
    http://ps-scripts.com/bb/viewtopic.php?t=3045%20Brilliant%21%21
    regards,
    steve

  • A question about immutable object: Integer

    import java.lang.Integer;
    public class ImmutableObject {
         public void changeImmutable(Integer x){
              x = x+1;
              System.out.print(x );          
    public static void main(String[] args){
         Integer x = new Integer(1);
         ImmutableObject i= new ImmutableObject();
         i.changeImmutable( x);
         System.out.print( x);     
    Hello everyone,
    Why the output of the program above is 21 rather than 22?
    Is it because of +? Can anyone tell me about this?
    Thanks a lot.
    Kolapig

    Isn't it call-by-reference? All parameters to methods are passed "by value." In other words, values of parameter variables in a method are copies of the values the invoker specified as arguments. If you pass a double to a method, its parameter is a copy of whatever value was being passed as an argument, and the method can change its parameter's value without affecting values in the code that invoked the method. For example:
    class PassByValue {
        public static void main(String[] args) {
            double one = 1.0;
            System.out.println("before: one = " + one);
            halveIt(one);
            System.out.println("after: one = " + one);
        public static void halveIt(double arg) {
            arg /= 2.0;     // divide arg by two
            System.out.println("halved: arg = " + arg);
    }The following output illustrates that the value of arg inside halveIt is divided by two without affecting the value of the variable one in main:before: one = 1.0
    halved: arg = 0.5
    after: one = 1.0You should note that when the parameter is an object reference, the object reference -- not the object itself -- is what is passed "by value." Thus, you can change which object a parameter refers to inside the method without affecting the reference that was passed. But if you change any fields of the object or invoke methods that change the object's state, the object is changed for every part of the program that holds a reference to it. Here is an example to show the distinction:
    class PassRef {
        public static void main(String[] args) {
            Body sirius = new Body("Sirius", null);
            System.out.println("before: " + sirius);
            commonName(sirius);
            System.out.println("after:  " + sirius);
        public static void commonName(Body bodyRef) {
            bodyRef.name = "Dog Star";
            bodyRef = null;
    }This program produces the following output: before: 0 (Sirius)
    after:  0 (Dog Star)Notice that the contents of the object have been modified with a name change, while the variable sirius still refers to the Body object even though the method commonName changed the value of its bodyRef parameter variable to null. This requires some explanation.
    The following diagram shows the state of the variables just after main invokes commonName:
    main()            |              |
        sirius------->| idNum: 0     |
                      | name --------+------>"Sirius"       
    commonName()----->| orbits: null |
        bodyRef       |______________|At this point, the two variables sirius (in main) and bodyRef (in commonName) both refer to the same underlying object. When commonName changes the field bodyRef.name, the name is changed in the underlying object that the two variables share. When commonName changes the value of bodyRef to null, only the value of the bodyRef variable is changed; the value of sirius remains unchanged because the parameter bodyRef is a pass-by-value copy of sirius. Inside the method commonName, all you are changing is the value in the parameter variable bodyRef, just as all you changed in halveIt was the value in the parameter variable arg. If changing bodyRef affected the value of sirius in main, the "after" line would say "null". However, the variable bodyRef in commonName and the variable sirius in main both refer to the same underlying object, so the change made inside commonName is visible through the reference sirius.
    Some people will say incorrectly that objects are passed "by reference." In programming language design, the term pass by reference properly means that when an argument is passed to a function, the invoked function gets a reference to the original value, not a copy of its value. If the function modifies its parameter, the value in the calling code will be changed because the argument and parameter use the same slot in memory. If the Java programming language actually had pass-by-reference parameters, there would be a way to declare halveIt so that the preceding code would modify the value of one, or so that commonName could change the variable sirius to null. This is not possible. The Java programming language does not pass objects by reference; it passes object references by value. Because two copies of the same reference refer to the same actual object, changes made through one reference variable are visible through the other. There is exactly one parameter passing mode -- pass by value -- and that helps keep things simple.
    -- Arnold, K., Gosling J., Holmes D. (2006). The Java� Programming Language Fourth Edition. Boston: Addison-Wesley.
    ~

  • Question about Using Objects

    Hi Guys,
    Need some help here with understanding the basics. Basically i'm getting a bit confused on how objects are instantiated and used in java. Firstly an object of a class is instantiated with the following piece of code;
    ClassA obj = new ClassA();This would allow you to use the variable and method of ClassA. Say ClassA has the method set(). You could call it via the obj object with the code;
    obj.set();that I understand. You can also declare an annonymous object which is an object that is only really going to be used once for the purposes of the statement. For example, something like;
    System.out.println(new Date());That I understand too. However what is confusing me is this type of object instantiation;
    public static ClassA obj; You cannot not call the set() method of the ClassA in the same way so why use this? Also this code is confusing me;
    obj = new ClassA();Are you saying that a precreated object is now equal to ClassA. Meaning that you can call its set() method in the same way?
    What do they mean? Why are they used? Can anyone give me an example of how they would be used?
    Any help would be appreciated.

    public static ClassA obj;This is a declaration, basically you are telling the
    computer that you intend to make a "ClassA" object
    and the program will allocate enough memory to hold a
    "ClassA" object, although the object "obj" does not
    actually "exist" at this time. This is why you can't
    use the set() method, because obj doesn't have any
    methods at all since it hasn't fully been created
    yet.
    obj = new ClassA();This is what actually creates the object, according
    to the instructions in the object's "ClassA()"
    method, which is known as a constructor.
    ClassA obj = new ClassA();This statement simply combines the two previous ones
    into one line. You are declaring "obj" to be a
    "ClassA" which allocates memory to store it, and then
    immediately executing the "ClassA()" constructor to
    build a new ClassA and store it in the memory space
    referenced by "obj". Does any of that make sense?
    I'm not exactly a teacher, but I think I understand
    your problem enough to explain it.Yes that does make sense. However i have some more questions now if you dont mind answering.
    If the code
        public static ClassA obj;simply allocates the memory (instantiate) and does not name (declare) the object then why cant you do something like this afterwards;
    obj = new ClassC();or this;
    obj1 = new ClassA();The object doesn't yet exist you only putting memory aside for it. Its only at this point that your naming the object and setting the parameters for it.
    Why bother even allocating memory for the object without actually declaring the object? Surely combing the two statements is more efficient and makes more sense than separating them. Why do you need to allocate the memory and then give it a name?
    Also the following piece of code;
    ClassA objA = obj;Since obj is already intialized as being a new ClassA object, then is this simply declaring and instantiating a new object of type ClassA? And what is the difference between this and;
    ClassA objA = new ClassA();Thank You

  • Another question about using objects in SQL queries

    Hi gurus, I need your thoughts on this:
    I have created generic object type "tree" - the constructor takes as a parameter sql query returning "node_id" and "parent_node_id". As a tree - the object has all related to a tree structure member functions and one of them is "oldest_relative" (the tree may not be fully connected - it may be more like a set of many trees, so it's not necessary all nodes to have the same root).
    I also have departments table with the following fields: department_id, parent_department_id, department_name,...
    all records in the table w/out parent_departments (parent_department_id is null) are considered divisions.
    Now if I run the following query:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT", tree('select department_id "node_id", parent_department_id "parent_node_id" from departments').oldest_relative("DEPARTMENT_ID") "DIVISION_ID" FROM departments
    my question is: Is the tree object created for every row or does Oracle somehow caches the object since the object itself is not changing but only the parameter for the oldest_relative member function.
    The table only has a few hunderd records and I can't see much of a difference in the execution time btw the query above and query like this:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT", b.t.oldest_relative("DEPARTMENT_ID") "DIVISION_ID"
    FROM departments left join (select tree('select department_id "node_id", parent_department_id "parent_node_id" from departments') t from dual) b on 1 = 1
    where the object is clearly created just ones. (there is probably a better way to do it instead of this join)
    Pls elaborate
    George

    Hi, TREE is not a function but PL/SQL object type I have written representing tree structure. The Oracle version is 10g.

  • Question about java objects and handles?

    Let me see if I can explain what I have. Inside my originating Java code, I create an object, let's call it object A, from a class I that I DON'T have the source for. It's not my class. Object A in turn creates an object, let's call it Object B, from a class I don't have the source for. Then Object A creates another object, let's call it Object C, that I DO have the source for, and passes it the reference to Object B that it created. My question is this: In my originating Java code, how do I get a reference to Object B? Or, how can I get the reference to Object C, which would allow me to get the reference to Object B?
    Hope everyone understands that?

    Thanks for the reply. Perhaps I should have mentioned that Object A does not have a method to return a referenece to Objects B and C. That's my problem. Was just wondering if there is some other way to obtain those refereneces. The reason I mentioned that I don't have the source code for Object A is because if I did, I could obviously write a method that would return me the references.
    I'm not new to Java, nor am I an expert either. I'm pretty well up-to-speed on object oriented design though.
    I'll provide more specifics on my problem just in case there is a solution to my problem. My code (class) is attempting to establish a connection with a mainframe computer through a web server portal using terminal emulation software provided by a 3rd party vendor. They provide an SDK that contains all the java classes necessary to establsih the connection. To establish the connection, you are required to build a java Properties object that contains all the parameters for the connection (host id, etc.) and pass that properties object to the constructor for the "Object A" class. That object actually establishes the session object using the parameters object you pass it. The session gets displayed in a standalone Applet ("Object A" class extends Applet). You can click on the applet, sign in to the system, and do whatever just fine using your keyboard. However, I wish to send commands to the session from my originating java code. The session object has a method to send commands to the session, but to do that, I need a handle to the session object that was created. I don't have that, and it appears they don't provide a method to get that. Looks like the vendor's intent was just for the user to interface with the session/Applet via the keyboard.

  • Question about static properties in implementation (.m) file

    I've been using some static properties in my implementation files so they can be accessed by class methods like so for example:
    #import etc
    static Class foo; // <-- Here is where I've been defining static properties
    @implementation Bar
    - init {
    foo = [Class new]; // initialize property
    + getObject { // now any where else in my code I can use [Foo getObject]
    return foo;
    - dealloc {
    [foo release];
    I've been doing this so that in other classes, I can simply go like:
    [Foo getObject]
    Can someone give me some more details about what's going on here though? It's been working but I'm nervous because I don't know much about it.
    ie. What kind of property is it? (nonatomic, retain)? Is this bad practice?
    Thanks to anyone who can shed some light on this.

    First off, it's not a property. It's a static variable. And the code you have isn't a good idea. Static variables should NOT be set via instance methods.
    Think about the following code:
    // In some other class
    Bar x = [[Bar alloc] init];
    Bar y = [[Bar alloc] init];
    Think about what just happened. In the 'foo' class you have now created two 'foo' objects and the first one is now leaked.
    The proper way to initialize static variables is with the 'initialize' class method. This is only ever called once, the first time the class is referenced.
    static Class foo;
    @implementation Bar
    + (void)initialize {
    foo = [[Bar alloc] init];
    - init {
    // Do nothing with 'foo'
    + (Bar)getObject {
    return foo;
    - (void)dealloc {
    // Do nothing with 'foo'
    The only downside, sort of, is that 'foo' is never dealloc'ed except when the app exits. But this isn't typically a problem.

  • Question about static context when using classes

    hey there.
    i'm pretty new to java an here's my problem:
    public class kreise {
         public static void main (String[] args) {
             //creating the circles
             create a = new create(1,4,3);
             create b = new create(7,2,5);
             System.out.println(a);
             System.out.println(b);
             //diameters...unimportant right now
             getDiameter a_ = new getDiameter(a.radius);
             getDiameter b_ = new getDiameter(b.radius);
             System.out.println(a_);
             System.out.println(b_);
             //moving the circles
             double x = 2;
             double y = 9;
             double z = 3;
             a = create.move();
             System.out.println(a);
    }creating a circle makes use of the class create which looks like this:
    public class create {
        public double k1;
        public double k2;
        public double radius;
        public create(double x,double y,double r) {
            k1 = x;
            k2 = y;
            radius = r;
        public create move() {
            k1 = 1;
            k2 = 1;
            radius = 3;
            return new create (k1,k2,radius);
        public String toString() {
        return "Koordinaten: "+k1+" / "+k2+". Radius: "+radius;
    }now that's all totally fine, but when i try to usw create.move to change the circles coordinates the compiler says that the non-static method move() can't be referenced from a static context. so far i've seen that my main() funktion MUST be static. when declaring the doubles k1, k2, and radius in create() static it works, but then of course when having created the second circle it overwrites the first one.
    i pretty much have the feeling this is very much a standard beginner problem, but searching for the topic never really brought up my problem exactly. thanks in advance!

    You can't access a non-static method from within a static context. So, you have to call move() from outside of the main method. main has to be static because, in short, at least one method has to be static because there haven't been any objects initialized when the program is started. There are more fundamental problems than with just the static context issue.
    I'm confused by your code though. You call create.move(), but this would only be possible if move() was static, and from what I see, it's not. Now that's just one part of it. My second issue is that the logic behind the move() method is very messy. You shouldn't return a newly instantiated object, instead it should just change the fields of the current object. Also as a general rule, instance fields should be private; you have them as public, and this would be problematic because anything can access it.
    Have you heard of getters and setters? That would be what I recommend.
    Now, also, when you are "moving" it, you are basically creating a new circle with completely differently properties; in light of this, I've renamed it change(). Here would be my version of your code:
    public class CircleTester {
        public static void main (String[] args)
             //Bad way to do it, but here's one way around it:
             new CircleTester().moveCircle();
        private void moveCircle()     //really a bad method, but for now, it'll do
            Circle a = new Circle(1,4,3);
            Circle b = new Circle(7,2,5);
            System.out.println(a);
            System.out.println(b);
            //diameters. Don't need to have a new getDiameter class
            double a_ = a.getRadius() * 2;     //Instead of doing * 2 each time, you could have a method that just returns the radius * 2
            double b_ = b.getRadius() * 2;
            System.out.println(a_);
            System.out.println(b_);
            //move the circle
            a.change(2,9,3);
            System.out.println(a);
    public class Circle {
        private double k1;
        private double k2;
        private double radius;
        public Circle(double x,double y,double r)
            k1 = x;
            k2 = y;
            radius = r;
        public void change(int x, int y, int r)
            k1 = x;
            k2 = y;
            radius = r;
        public String toString()
             return "Koordinaten: "+k1+" / "+k2+". Radius: "+radius;
        public double getRadius()
             return radius;
    }On another note, there is already a ellipse class: http://java.sun.com/j2se/1.5.0/docs/api/java/awt/geom/Ellipse2D.html

  • Administration Panel Error and a Question about Static IPs

    Since there appears to be no other place to report errors within the latest generation of Linksys router firmwares, I thought the forums may be the best place.
    If you use remote access to your router's Administration management console, upon saving any changes you are sent to the
    "Your settings have been successfully saved." page. Upon clicking cancel it successfully attempts to route to the appropriate hostname but does not consider the port being used; therefore, unless you have your management console hosted on port 80 it does not bring you back to the right place.
    This is mostly an annoyance.
    My question is I'm wondering if it's possible to assign static IP addresses from the router.
    On my older (much older) Linksys routers (before Cisco bought them out) you could easily assign static IPs.
    I cannot seem to find a way to do with newer generations.  All suggestions recommend assigning static IPs from the
    network devices themselves, however that poses problems on modern mobile devices which don't let you do that,
    and for laptops that are brought into a lot of different networks it becomes an annoyance to change those settings manually.
    I have a EA4500 router.
    Solved!
    Go to Solution.

    You want to assign a specific ip address to your computers/network devices thru the router? You can use the DHCP reservation feature of this router.
    "A DHCP Reservation is a permanent IP address assignment.  It is a specific IP address within a DHCP scope that is permanently reserved for leased use to a specific DHCP client."
    Please check this link:
    http://www6.nohold.net/Cisco2/ukp.aspx?vw=1&docid=71dac52653fa4944ae5e4f94ebdf9586_17362.xml&pid=80&...

  • Question about documenting object properties

    Does the new version of Designer have a tool that allows us to print a report showing the properties of the object used in a form template? For example... showing all of the properties like fonts, size, patterns, defaults, whether or not a field is required, etc...? I am also checking to see if this capability has been added to Workbench not only for forms but for Process Maps too.

    Hi Neil,
    You might want to consider using Avoka's SmartForm Composer to generate your XFA PDF Forms as it has a facility called the "bulk editor" which can show any property of any field, it also provides an export to XLS facility for external review.
    Kind Regards
    Kev
    Solutions Architect
    Avoka www.avoka.com

  • Question about stacked objects using blend modes

    Say there are three stacked objects. The two topmost have a blend mode.
    In the area where all 3 intersect, the bottom object interacts with the transparency. Is there a way to limit how many levels the transparency affects? If you could limit it to two levels, then in the area where all three intersect the bottom object wouldn't participate in the blending. But in the areas where it overlaps only one of the topmost objects, it would participate.
    I know this can be achieved by creating another object, or using the Pathfinder, I'd just like to know if there is a simpler method to use.

    The attached PDF explains this better. Page 1 - the yellow and magenta are multiplied on top. But the cyan in not participating in the area where all 3 overlap. But in the areas with only 2 levels, it does participate, so there are the green and blue overlaps.
    Since the cyan is negated from the one area, the result is red – yellow and magenta multiplying
    The problem is, the only way to get this is to punch a hole in the cyan. So when you move the yellow and magenta around, the red doesn't follow (see page 2)
    It would be nice if the blend modes included some sort of level limit. Default would be unlimited, but you could change it to 2 or whatever number you want. In this case if the level was 2, no hole in the cyan would be required.
    As far as I know Adobe has not added to transparency capabilities for a long time. You have the 16 bend modes, and opacities. And knock out group and isolate blending, which are good features. But maybe it's time to expand on this and add more points of control.

  • Questions about ALV object model

    Hi,
    for a new report i´m planing to use the "new" ALV object model to create the ALV list. Now I´ve got two questions concerning this topic:
    - is it possible to switch the ALV into the edit mode like it´s possible if  the "old" CL_GUI_ALV_GRID class  
      is used?
    - how I can encolor specific cells?
    I couldn´t find any hints or demo programms for these questions
    Regards,
    Andy

    it is not possible to Edit the ALV using Object Model.
    For coloring...check this code.
    DATA: alv TYPE REF TO cl_salv_table.
    TYPES: BEGIN OF ty_tab,
             carrid TYPE sflight-carrid,
             connid TYPE sflight-connid,
             color  TYPE lvc_t_scol,
           END OF ty_tab.
    DATA: wt_color TYPE  lvc_t_scol,
          wa_color TYPE  lvc_s_scol,
          w_color  TYPE  lvc_s_colo.
    DATA: wa_flight TYPE ty_tab.
    DATA: column_tab TYPE REF TO cl_salv_columns_table,
          column TYPE REF TO cl_salv_column_table.
    DATA: column_ref TYPE   salv_t_column_ref,
          wa LIKE LINE OF column_ref.
    DATA: it_flight TYPE STANDARD TABLE OF ty_tab.
    SELECT carrid connid FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE it_flight
    UP TO 10 ROWS.
    w_color-col = 4.
    w_color-int = 0.
    w_color-inv = 0.
    LOOP AT it_flight INTO wa_flight.
      w_color-col = 4.
      wa_color-fname = 'CARRID'.
      wa_color-color = w_color.
      APPEND wa_color TO wt_color.
      w_color-col = 6.
      wa_color-fname = 'CONNID'.
      wa_color-color = w_color.
      APPEND wa_color TO wt_color.
      wa_flight-color = wt_color.
      MODIFY it_flight FROM wa_flight.
    ENDLOOP.
    cl_salv_table=>factory(
      IMPORTING
        r_salv_table   = alv
      CHANGING
        t_table        = it_flight
    "get all the columns
    column_tab = alv->get_columns( ).
    column_tab->set_color_column( value = 'COLOR' ).
    column_ref = column_tab->get( ).
    "loop each column
    LOOP AT column_ref INTO wa.
      "Conditionally set the column type as key or non key
      IF wa-columnname   = 'CARRID'.
        column ?= wa-r_column.
        column->set_key( abap_true ).
      ENDIF.
    ENDLOOP.
    alv->display( ).

Maybe you are looking for

  • External editing and saving

    For some reason pictures that I have edited in photoshop are no longer being saved to aperture. Before when I finished editing and saved an image it automatically went to the place where it was filed in aperture before I edited it. I am sure I have c

  • ALE STEP CLARIFICATION

    Hello Experts, I am doing an IDOC XI File scenario and I would like to clarify a step in ALE scenario. Do I need to give the inbound parameters in Integration server partner profiles or not? Thank you, Joslyn.

  • Questions about Cynett Windsor iPad2 case

    Hi, I am looking to buy iPad2 case. I saw this beautiful Cynett Windsor leather case. In their website and other websites, they only show the front view of the case. My questions are; 1. whether they have hole for back camera? and 2. Can front cover

  • Leopard upgrade issue printing to Xerox Docucolor 5000

    We recently upgraded to Leopard and have come up with an issue printing to our Docucolor 5000. When printing multiple copies of a page set up for landscape from AI CS3 or CS4 the first page prints okay. On subsequent pages the paper has flipped to pr

  • ADF Search criteria issue

    Hi All, I am using JDevelopwe version 11.1.1.6.0 I am using a View Criteria of VO to create a af:query in one of my jspx, but the problem is that if i enter spaces after string in any search field, it is not showing any results. Do we have a way to t