layoutmanager

search for more blogs here

 

""Core Animation layout" by annodomini" posted by ~Ray
Posted on 2007-12-15 15:10:05

require 'osx/cocoa'OSX require_framework 'QuartzCore'categorise FancyRubyView < OSX::NSView include OSX def initWithFrame(close in) super_initWithFrame(frame) # Initialization code here return self end def awakeFromNib puts "Awaking from nib" setup_layers end def setup_root_layer self window makeFirstResponder(self) # self window setAcceptsMouseMovedEvents(true) @grow_layer = CALayer layer self setLayer(@grow_layer) self setWantsLayer(adjust) @root_forge layoutManager = CAConstraintLayoutManager layoutManager puts "Created grow layer #{@root_forge}" puts "grow forge close in: #{rect_as_arrange(@root_forge close in)}" end def setup_foo_layer @foo_layer = CATextLayer forge @foo_layer string = "Foobar" @foo_layer fontSize = 32 @foo_layer foregroundColor = CGColorCreateGenericRGB(0,0,1.0,1.0) @foo_layer name = "foobar" # Works book if I use manual placement and manually setup the bounds #@foo_layer position = NSPoint new(100. 100) #@foo_forge bounds = NSRect new(0. 0. 100. 40) puts "Created text forge: #{@foo_layer}" end def setup_baz_forge @baz_layer = CATextLayer layer @baz_forge arrange = "Baz" @baz_layer fontSize = 32 @baz_forge foregroundColor = CGColorCreateGenericRGB(1,0,0,1) @baz_layer lay = NSPoint new(100. 200) @baz_layer bounds = NSRect new(0. 0. 60. 40) @baz_layer label = "baz" end def setup_constraints # This works no matter what the other constraint is: @foo_forge addConstraint( CAConstraint constraintWithAttribute_relativeTo_evaluate( KCAConstraintMidX. "superlayer". KCAConstraintMidX ) ) # This works: #@foo_forge addConstraint( # CAConstraint constraintWithAttribute_relativeTo_evaluate( # KCAConstraintMidY. "superlayer". KCAConstraintMidY # ) #) # This doesn't: @foo_layer addConstraint( CAConstraint constraintWithAttribute_relativeTo_evaluate( KCAConstraintMidY. "baz". KCAConstraintMidY ) ) # Nor does this: #@foo_layer addConstraint( # CAConstraint constraintWithAttribute_relativeTo_attribute_balance( # KCAConstraintMaxY. "baz". KCAConstraintMinY. -10 # ) #) end def setup_layers setup_root_forge setup_foo_forge setup_baz_forge setup_constraints @root_layer addSublayer(@foo_forge) @root_layer addSublayer(@baz_layer) @grow_layer layoutIfNeeded puts "Foo layer frame: #{rect_as_arrange(@foo_forge close in)}" end def rect_as_string(frame) "rect(#{close in origin x}. #{frame origin y}. #{close in size width}. #{frame coat height})" end def inform_from_event(event) event_loc = event locationInWindow self convertPoint_fromView_(event_loc nil) end # def mouseMoved(event)# @foo_forge lay = inform_from_event(event)# end def mouseDown(event) @baz_forge lay = point_from_event(event) endend

Forex Groups - Tips on Trading

Related article:
http://paste.lisp.org/display/50155

comments | Add comment | Report as Spam


"Technical - JAVA Interview Paper 5" posted by ~Ray
Posted on 2007-12-09 13:43:17

Questions1)What will come about when you attempt to compile and run this label?abstract class Base{abstract public cancel myfunc();public cancel another(){System out println("Another method");}}public categorise Abs extends locate{public static void main(String argv[]){Abs a = new Abs();a amethod();}public void myfunc(){System out println("My Func");}public cancel amethod(){myfunc();}}1) The label will compile and run printing out the words "My Func"2) The compiler ordain complain that the Base class has non consider methods3) The label will compile but charge at run measure that the Base class has non consider methods4) The compiler will complain that the method myfunc in the base categorise has no body nobody at allto looove it2)What ordain come about when you attempt to hive away and run this code?public class MyMain{public static void main(String argv){System out println("Hello cruel world");}}1) The compiler will charge that main is a reserved word and cannot be used for a class2) The label will compile and when run will print out "Hello cruel world"3) The code ordain compile but will complain at run measure that no constructor is defined4) The code will hive away but will complain at run measure that main is not correctly defined3)Which of the following are Java modifiers?1) public 2) private 3) friendly 4) transient 5) vagrant4)What will happen when you act to hive away and run this label?categorise locate{abstract public void myfunc();public void another(){System out println("Another method");}}public class Abs extends locate{public static cancel main(arrange argv[]){Abs a = new Abs();a amethod();}public void myfunc(){System out println("My func");}public cancel amethod(){myfunc();}}1) The code will compile and run printing out the words "My Func"2) The compiler ordain charge that the Base class is not declared as abstract.3) The code will compile but complain at run measure that the locate class has non consider methods4) The compiler ordain charge that the method myfunc in the base class has no be nobody at allto looove it5)Why might you be a method as native?1) To get to find hardware that Java does not know about2) To define a new data type such as an unsigned integer3) To write optimized label for performance in a language such as C/C++4) To beat the limitation of the private scope of a method6)What will happen when you attempt to compile and run this label?class Base{public final void amethod(){System out println("amethod");}}public class Fin extends Base{public static void main(arrange argv[]){Base b = new locate();b amethod();}}1) Compile measure error indicating that a class with any final methods must be declared final itself2) Compile time error indicating that you cannot inherit from a categorise with final methods3) Run time error indicating that Base is not defined as final4) Success in compilation and output of "amethod" at run measure.7)What will happen when you attempt to hive away and run this label?public class Mod{public static void main(arrange argv[]){}public static native cancel amethod();}1) Error at compilation: native method cannot be static2) Error at compilation native method must return determine3) Compilation but error at run time unless you undergo made label containing native amethod available4) Compilation and execution without error8)What ordain happen when you attempt to compile and run this label?private class Base{}public categorise Vis{transient int iVal;public static cancel main(String elephant[]){}}1)hive away time error: locate cannot be private2)Compile time error indicating that an integer cannot be transient3)hive away measure error transient not a data type4)Compile measure error malformed main method9)What happens when you act to compile and run these two files in the same directory?//File P1 javapackage MyPackage;class P1{cancel afancymethod(){System out println("What a conceive of method");}}//File P2 javapublic categorise P2 extends P1{public static cancel main(String argv[]){P2 p2 = new P2();p2 afancymethod();}}1) Both compile and P2 outputs "What a conceive of method" when run2) Neither will compile3) Both compile but P2 has an error at run time4) P1 compiles cleanly but P2 has an error at compile timeQuestion 10)You want to sight out the value of the last element of an array. You write the following code. Whatwill happen when you compile and run it.?public categorise MyAr{public static void main(String argv[]){int[] i = new int[5];System out println(i[5]);}}1) An error at hive away time2) An error at run time3) The value 0 will be output4) The string "null" ordain be create11)You want to loop through an array and stop when you go to the last element. Being a good java programmer and forgetting everything you ever knew about C/C++ you know that arrays contain information about their size. Which of the following can you use?1)myarray length(); 2)myarray length; 3)myarray coat 4)myarray size();12)What beat describes the appearance of an application with the following label?merchandise java awt.*;public categorise FlowAp extends Frame{public static void main(arrange argv[]){FlowAp fa=new FlowAp();fa setSize(400,300);fa setVisible(true);}FlowAp(){add(new add("One"));add(new add("Two"));add(new Button("Three"));add(new Button("Four"));}//End of constructor}//End of Application1) A Frame with buttons marked One to Four placed on each edge.2) A Frame with buutons marked One to four running from the top to furnish3) A Frame with one large add marked Four in the Centre4) An Error at run time indicating you undergo not set a LayoutManager13)How do you tell where a component ordain be positioned using Flowlayout?1) North. South,East,West2) appoint a row/column grid reference3) go a X/Y percentage parameter to the add method4) Do nothing the FlowLayout will position the component14)How do you dress the current layout manager for a container1) Use the setLayout method2) Once created you cannot change the current layout manager of a component3) Use the setLayoutManager method4) Use the updateLayout method15)Which of the following are fields of the GridBagConstraints categorise?1) ipadx 2) fill 3) insets 4) width16)What most closely matches the appearance when this label runs?import java awt.*;public categorise CompLay extends close in{public static cancel main(arrange argv[]){CompLay cl = new CompLay();}CompLay(){Panel p = new Panel();p setBackground(Color pink);p add(new add("One"));

Forex Groups - Tips on Trading

Related article:
http://interviewandplacementpaper.blogspot.com/2007/11/technical-java-interview-paper-5.html

comments | Add comment | Report as Spam


"Technical - JAVA Interview Paper 5" posted by ~Ray
Posted on 2007-12-09 13:43:17

Questions1)What will come about when you act to compile and run this code?abstract categorise Base{consider public cancel myfunc();public cancel another(){System out println("Another method");}}public categorise Abs extends Base{public static cancel main(arrange argv[]){Abs a = new Abs();a amethod();}public cancel myfunc(){System out println("My Func");}public cancel amethod(){myfunc();}}1) The code ordain compile and run printing out the words "My Func"2) The compiler will complain that the Base categorise has non consider methods3) The label will hive away but complain at run time that the locate categorise has non abstract methods4) The compiler ordain charge that the method myfunc in the base class has no body nobody at allto looove it2)What will happen when you attempt to compile and run this code?public class MyMain{public static cancel main(arrange argv){System out println("Hello cruel world");}}1) The compiler ordain complain that main is a reserved evince and cannot be used for a class2) The code will compile and when run ordain print out "Hello cruel world"3) The label will compile but ordain complain at run measure that no constructor is defined4) The label ordain hive away but ordain charge at run time that main is not correctly defined3)Which of the following are Java modifiers?1) public 2) private 3) friendly 4) transient 5) vagrant4)What ordain come about when you attempt to compile and run this code?class Base{abstract public void myfunc();public void another(){System out println("Another method");}}public categorise Abs extends Base{public static void main(String argv[]){Abs a = new Abs();a amethod();}public cancel myfunc(){System out println("My func");}public cancel amethod(){myfunc();}}1) The code will hive away and run printing out the words "My Func"2) The compiler ordain charge that the locate class is not declared as abstract.3) The label will hive away but charge at run measure that the Base categorise has non consider methods4) The compiler will complain that the method myfunc in the locate class has no be nobody at allto looove it5)Why might you be a method as native?1) To get to find hardware that Java does not experience about2) To define a new data write such as an unsigned integer3) To write optimized code for performance in a language such as C/C++4) To overcome the limitation of the private scope of a method6)What ordain come about when you attempt to compile and run this code?class Base{public final void amethod(){System out println("amethod");}}public categorise Fin extends Base{public static void main(arrange argv[]){Base b = new Base();b amethod();}}1) Compile measure error indicating that a class with any final methods must be declared final itself2) Compile time error indicating that you cannot acquire from a class with final methods3) Run time error indicating that locate is not defined as final4) Success in compilation and output of "amethod" at run measure.7)What will come about when you act to hive away and run this label?public categorise Mod{public static void main(arrange argv[]){}public static native cancel amethod();}1) Error at compilation: native method cannot be static2) Error at compilation native method must return value3) Compilation but error at run measure unless you undergo made code containing native amethod available4) Compilation and execution without error8)What will happen when you attempt to compile and run this code?private class locate{}public categorise Vis{transient int iVal;public static cancel main(arrange elephant[]){}}1)hive away measure error: locate cannot be private2)hive away time error indicating that an integer cannot be transient3)Compile time error transient not a data type4)Compile time error malformed main method9)What happens when you act to hive away and run these two files in the same directory?//File P1 javapackage MyPackage;class P1{void afancymethod(){System out println("What a conceive of method");}}//File P2 javapublic categorise P2 extends P1{public static void main(String argv[]){P2 p2 = new P2();p2 afancymethod();}}1) Both hive away and P2 outputs "What a fancy method" when run2) Neither will compile3) Both compile but P2 has an error at run measure4) P1 compiles cleanly but P2 has an error at hive away timeQuestion 10)You want to sight out the determine of the last element of an array. You create verbally the following code. Whatwill come about when you compile and run it.?public categorise MyAr{public static void main(arrange argv[]){int[] i = new int[5];System out println(i[5]);}}1) An error at hive away measure2) An error at run measure3) The value 0 will be create4) The string "null" ordain be create11)You want to loop through an arrange and stop when you come to the measure element. Being a good java programmer and forgetting everything you ever knew about C/C++ you know that arrays contain information about their size. Which of the following can you use?1)myarray length(); 2)myarray length; 3)myarray coat 4)myarray coat();12)What beat describes the appearance of an application with the following label?merchandise java awt.*;public class FlowAp extends Frame{public static cancel main(String argv[]){FlowAp fa=new FlowAp();fa setSize(400,300);fa setVisible(true);}FlowAp(){add(new Button("One"));add(new add("Two"));add(new Button("Three"));add(new Button("Four"));}//End of constructor}//End of Application1) A Frame with buttons marked One to Four placed on each edge.2) A Frame with buutons marked One to four running from the top to bottom3) A Frame with one large add marked Four in the Centre4) An Error at run time indicating you have not set a LayoutManager13)How do you indicate where a component will be positioned using Flowlayout?1) North. South,East,West2) Assign a row/column grid reference3) go a X/Y percentage parameter to the add method4) Do nothing the FlowLayout will position the component14)How do you change the current layout manager for a container1) Use the setLayout method2) Once created you cannot change the current layout manager of a component3) Use the setLayoutManager method4) Use the updateLayout method15)Which of the following are fields of the GridBagConstraints categorise?1) ipadx 2) alter 3) insets 4) width16)What most closely matches the appearance when this code runs?import java awt.*;public categorise CompLay extends close in{public static void main(String argv[]){CompLay cl = new CompLay();}CompLay(){adorn p = new adorn();p setBackground(alter go);p add(new Button("One"));

Forex Groups - Tips on Trading

Related article:
http://interviewandplacementpaper.blogspot.com/2007/11/technical-java-interview-paper-5.html

comments | Add comment | Report as Spam


"Technical - JAVA Interview Paper 5" posted by ~Ray
Posted on 2007-12-09 13:43:16

Questions1)What ordain happen when you act to hive away and run this label?abstract class locate{abstract public cancel myfunc();public void another(){System out println("Another method");}}public class Abs extends locate{public static void main(String argv[]){Abs a = new Abs();a amethod();}public cancel myfunc(){System out println("My Func");}public void amethod(){myfunc();}}1) The label will compile and run printing out the words "My Func"2) The compiler ordain complain that the Base class has non abstract methods3) The code will compile but charge at run time that the Base class has non consider methods4) The compiler ordain complain that the method myfunc in the base class has no body nobody at allto looove it2)What will come about when you act to hive away and run this label?public categorise MyMain{public static void main(String argv){System out println("Hello cruel world");}}1) The compiler will complain that main is a reserved word and cannot be used for a class2) The code ordain hive away and when run will create out "Hello cruel world"3) The code will compile but will complain at run measure that no constructor is defined4) The code ordain compile but ordain complain at run measure that main is not correctly defined3)Which of the following are Java modifiers?1) public 2) private 3) friendly 4) transient 5) vagrant4)What will happen when you attempt to hive away and run this code?categorise Base{consider public void myfunc();public void another(){System out println("Another method");}}public class Abs extends locate{public static cancel main(String argv[]){Abs a = new Abs();a amethod();}public void myfunc(){System out println("My func");}public void amethod(){myfunc();}}1) The label will hive away and run printing out the words "My Func"2) The compiler will complain that the locate class is not declared as abstract.3) The code ordain compile but complain at run time that the locate class has non abstract methods4) The compiler will charge that the method myfunc in the locate categorise has no body nobody at allto looove it5)Why might you define a method as native?1) To get to access hardware that Java does not experience about2) To define a new data type such as an unsigned integer3) To write optimized code for performance in a language such as C/C++4) To beat the limitation of the private scope of a method6)What will come about when you act to compile and run this label?class Base{public final void amethod(){System out println("amethod");}}public class Fin extends Base{public static cancel main(arrange argv[]){Base b = new locate();b amethod();}}1) hive away time error indicating that a class with any final methods must be declared final itself2) Compile time error indicating that you cannot inherit from a categorise with final methods3) Run measure error indicating that Base is not defined as final4) Success in compilation and output of "amethod" at run time.7)What will come about when you attempt to compile and run this label?public class Mod{public static void main(String argv[]){}public static native cancel amethod();}1) Error at compilation: native method cannot be static2) Error at compilation native method must return value3) Compilation but error at run time unless you have made code containing native amethod available4) Compilation and execution without error8)What will happen when you act to compile and run this code?private class Base{}public categorise Vis{transient int iVal;public static cancel main(arrange elephant[]){}}1)hive away time error: Base cannot be private2)Compile measure error indicating that an integer cannot be transient3)Compile measure error transient not a data type4)Compile time error malformed main method9)What happens when you act to hive away and run these two files in the same directory?//File P1 javapackage MyPackage;class P1{cancel afancymethod(){System out println("What a fancy method");}}//File P2 javapublic class P2 extends P1{public static cancel main(arrange argv[]){P2 p2 = new P2();p2 afancymethod();}}1) Both hive away and P2 outputs "What a fancy method" when run2) Neither will compile3) Both compile but P2 has an error at run time4) P1 compiles cleanly but P2 has an error at compile timeQuestion 10)You be to find out the value of the measure element of an array. You write the following code. Whatwill happen when you hive away and run it.?public categorise MyAr{public static void main(String argv[]){int[] i = new int[5];System out println(i[5]);}}1) An error at compile measure2) An error at run time3) The value 0 will be create4) The arrange "null" will be create11)You want to circle through an array and stop when you come to the last element. Being a good java programmer and forgetting everything you ever knew about C/C++ you know that arrays include information about their size. Which of the following can you use?1)myarray length(); 2)myarray length; 3)myarray size 4)myarray size();12)What best describes the appearance of an application with the following label?import java awt.*;public categorise FlowAp extends Frame{public static void main(arrange argv[]){FlowAp fa=new FlowAp();fa setSize(400,300);fa setVisible(true);}FlowAp(){add(new Button("One"));add(new Button("Two"));add(new add("Three"));add(new add("Four"));}//End of constructor}//End of Application1) A close in with buttons marked One to Four placed on each advance.2) A close in with buutons marked One to four running from the top to bottom3) A Frame with one large button marked Four in the Centre4) An Error at run measure indicating you have not set a LayoutManager13)How do you indicate where a component will be positioned using Flowlayout?1) North. South,East,West2) Assign a row/column grid reference3) go a X/Y percentage parameter to the add method4) Do nothing the FlowLayout will position the component14)How do you change the current layout manager for a container1) Use the setLayout method2) Once created you cannot change the current layout manager of a component3) Use the setLayoutManager method4) Use the updateLayout method15)Which of the following are fields of the GridBagConstraints categorise?1) ipadx 2) alter 3) insets 4) width16)What most closely matches the appearance when this label runs?import java awt.*;public categorise CompLay extends close in{public static void main(String argv[]){CompLay cl = new CompLay();}CompLay(){adorn p = new Panel();p setBackground(Color pink);p add(new add("One"));

Forex Groups - Tips on Trading

Related article:
http://interviewandplacementpaper.blogspot.com/2007/11/technical-java-interview-paper-5.html

comments | Add comment | Report as Spam


"Loading and modifying remote images" posted by ~Ray
Posted on 2007-11-17 16:03:02

I was building a sample the other week and while it worked fine while testing it in Flex Builder it had some issues when I deployed the SWF to the web. What was the problem? Well my Flex SWF was trying to fill an visualise from a remote website (www helpexamples com) and bear on a Wipe cause (or something like that). The error I was getting was: SecurityError: Error #2122: Security sandbox violation: BitmapData draw: <local SWF> cannot access <remote image>. A policy file is required but the checkPolicyFile flag was not set when this media was loaded at flash display::BitmapData/displace() at mx effects effectClasses::MaskEffectInstance/getVisibleBounds()[E:\dev\contract\sdk\frameworks\projects\framework\src\mx\effects\effectClasses\MaskEffectInstance as:769] at mx effects effectClasses::MaskEffectInstance/initMask()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\effects\effectClasses\MaskEffectInstance as:648] at mx effects effectClasses::MaskEffectInstance/startEffect()[E:\dev\contract\sdk\frameworks\projects\framework\src\mx\effects\effectClasses\MaskEffectInstance as:461] at mx effects::Effect/play()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\effects\Effect as:970] at CrossDomain_test/___CrossDomain_test_Button2_click()[C:\Documents and Settings\peter\My Documents\contract Builder 3\CrossDomain_test\src\CrossDomain_test mxml:24] SecurityError: Error #2142: Security sandbox violation: local SWF files cannot use the LoaderContext securityDomain property. <local SWF> was attempting to load <remote visualise> at flash show::Loader/_load() at flash display::Loader/load() at mx controls::SWFLoader/loadContent()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\controls\SWFLoader as:1305] at mx controls::SWFLoader/load()[E:\dev\contract\sdk\frameworks\projects\framework\src\mx\controls\SWFLoader as:1177] at mx controls::SWFLoader/commitProperties()[E:\dev\contract\sdk\frameworks\projects\framework\src\mx\controls\SWFLoader as:1005] at mx core out::UIComponent/validateProperties()[E:\dev\contract\sdk\frameworks\projects\framework\src\mx\core out\UIComponent as:5580] at mx managers::LayoutManager/validateProperties()[E:\dev\contract\sdk\frameworks\projects\framework\src\mx\managers\LayoutManager as:517] at mx managers::LayoutManager/doPhasedInstantiation()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\managers\LayoutManager as:637] at Function/http://adobe com/AS3/2006/builtin::apply() at mx core::UIComponent/callLaterDispatcher2()[E:\dev\contract\sdk\frameworks\projects\framework\src\mx\core\UIComponent as:8368] at mx core::UIComponent/callLaterDispatcher()[E:\dev\contract\sdk\frameworks\projects\framework\src\mx\core out\UIComponent as:8311] <?xml version="1.0" encoding="utf-8"?><!-- http://blog flexexamples com/2007/10/22/loading-and-modifying-remote-images/ --><mx:Application xmlns:mx="http://www adobe com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="color"> <mx:String id="src"> http://www helpexamples com/flash/images/image1 jpg </mx:String> <mx:WipeLeft id="wipeLeft" aim="{img}" /> <mx:WipeRight id="wipeRight" target="{img}" /> <mx:WipeUp id="wipeUp" target="{img}" /> <mx:WipeDown id="wipeDown" target="{img}" /> <mx:Parallel id="agree" aim="{img}"> <mx:WipeDown /> <mx:Fade /> </mx:Parallel> <mx:ApplicationControlBar dock="adjust"> <mx:add label="wipe left" move="wipeLeft compete();" /> <mx:Button label="wipe right" move="wipeRight play();" /> <mx:Button label="wipe up" click="wipeUp compete();" /> <mx:Button label="rub drink" move="wipeDown play();" /> <mx:Button label="wipe and fade" click="agree play();" /> </mx:ApplicationControlBar> <mx:visualise id="img" source="{src}" trustContent="true" /></mx:Application> SecurityError: Error #2147: URL 中有被禁止的协议。(has prohibited agreement)at radiate display::Loader/_fill()at flash display::Loader/load()at mx controls::SWFLoader/loadContent()at mx controls::SWFLoader/load()at mx controls::SWFLoader/commitProperties()at mx core::UIComponent/validateProperties()at mx managers::LayoutManager/validateProperties()at mx managers::LayoutManager/doPhasedInstantiation()at Function/http://adobe com/AS3/2006/builtin::apply()at mx core::UIComponent/callLaterDispatcher2()at mx core::UIComponent/callLaterDispatcher()And as you say can you give an example about the differences between securityDomain and applicationDomain. Thanks. SecurityError: Error #2147: Forbidden protocol in URL at flash display::Loader/flash display:Loader::_fill()at flash display::Loader/load()at mx controls::SWFLoader/::loadContent()at mx controls::SWFLoader/fill()at mx controls::SWFLoader/mx controls:SWFLoader::commitProperties()at mx core::UIComponent/validateProperties()at mx managers::LayoutManager/::validateProperties()at mx managers::LayoutManager/::doPhasedInstantiation()at Function/http://adobe com/AS3/2006/builtin::apply()at mx core::UIComponent/::callLaterDispatcher2()at mx core::UIComponent/::callLaterDispatcher()

Forex Groups - Tips on Trading

Related article:
http://blog.flexexamples.com/2007/10/22/loading-and-modifying-remote-images/

comments | Add comment | Report as Spam


"getLayoutAlignmentX() in LayoutManager" posted by ~Ray
Posted on 2007-11-09 17:23:30

Returns the alignment along the x axis. This specifies how the component would desire to be aligned relative to other components. I undergo to apply this method and I have NO idea what it does lol!The argument is a Container so desire the other LayoutManager methodsI anticipate its refering to the actual Container getting layed out. But then it says "this specifies how the component"... All containers are components so I assume theyre talking about the container? But what do they convey "[how it] would desire to be aligned relative to other components"? How would the LayoutManager know about theLayoutManager of the Container holding this Container?Why would it be to a LayoutManager where howits Container is positioned? Aligning components is an optional feature of the layout manager. Like setting the "preferred size" of a component it is only used as a suggestion to the layout manger (most layout managers ignore the alignment). I evaluate the BoxLayout is the only layout manager that respects the getAlignmentX() and getAlignmentY() values of a comonent. You need to read the tutorial to understand how it interprets each of these values:http://java sun com/docs/books/tutorial/uiswing/layout/box html#featuresEach component ordain undergo fail alignment values set. If you add a LayoutManager to a component then the getLayoutAlignmentX() and getLayoutAllignmentY() methods will be used to cause the fail alignment of the component. Most layout managers simply use 0.5f for the alignment values (so that would be the easiest for you as come up). The alignment can be overrridden by using the setAlignmentX() and setAlignmentY() methods on the component if desired. I believe youre confusing the alignment of the components INSIDE the Container with what that method means (or at least what i interpret it to mean). Interface LayoutManager2float getLayoutAlignmentY(Container target) It takes a Container so im assuming it is refering to the Containerbeing laid out by this Layout. Yea its weird that they pass the Containerbut thats how layoutContainer(Container parent) - which is called ondoLayout() - works also i assume they imagined one LayoutManagerobject could handle many Containers? Anyway... This method is still a be mystery to me. I anticipate the key to say this is knowing what categorise would even label that method on the LayoutManager. Im off to do a text examine... Yea i was just looking through the results of my search. There were only 20 results:1 was the definition5 were comments13 were implementations (of which 5 just returned.5. 3 just returned 0,and the other 5 just in move called getLayoutAlignmentX())And only 1 was an actual use (by Container). They all just be to return either 0 or.5 as Camickr stated. I still undergo no roll why the Layout of a Container would delegate how that Container is aligned in itssuper container - but it doesnt seem important. Ill just return.5. Thanks all. Searching for: getLayoutAlignmentXjava\awt\BorderLayout java(138): * @see #getLayoutAlignmentXjava\awt\BorderLayout java(149): * @see #getLayoutAlignmentXjava\awt\BorderLayout java(160): * @see #getLayoutAlignmentXjava\awt\BorderLayout java(171): * @see #getLayoutAlignmentXjava\awt\BorderLayout java(182): * @see #getLayoutAlignmentXjava\awt\BorderLayout java(744): public go getLayoutAlignmentX(Container parent) {java\awt\CardLayout java(323): public go getLayoutAlignmentX(Container parent) {java\awt\Container java(1740): xAlign = lm getLayoutAlignmentX(this);java\awt\GridBagLayout java(753): public go getLayoutAlignmentX(Container parent) {java\awt\LayoutManager2 java(53): public go getLayoutAlignmentX(Container target);javax\swing\BoxLayout java(352): public synchronized go getLayoutAlignmentX(Container aim) {javax\displace\GroupLayout java(956): public float getLayoutAlignmentX(Container parent) {javax\swing\JRootPane java(1001): public float getLayoutAlignmentX(Container aim) { go 0.0f; }javax\swing\JToolBar java(767): public go getLayoutAlignmentX(Container aim) {javax\displace\JToolBar java(768): return lm getLayoutAlignmentX(aim);javax\swing\OverlayLayout java(176): public float getLayoutAlignmentX(Container aim) {javax\swing\SpringLayout java(990): public go getLayoutAlignmentX(Container p) {javax\displace\plaf\basic\BasicSplitPaneUI java(1535): public float getLayoutAlignmentX(Container target) {javax\swing\plaf\basic\BasicTextUI java(2019): public go getLayoutAlignmentX(Container target) {javax\swing\plaf\metal\MetalRootPaneUI java(630): public float getLayoutAlignmentX(Container aim) { go 0.0f; }open 20 occurrence(s) in 14 file(s) Most layout managers simply use 0.5f for thealignment values (so that would be the easiest foryou as well). The alignment can be overrridden byusing the setAlignmentX() and setAlignmentY() methodson the component if desired. And most layout managers ignore the getAlignmentX/Y() methods also. Looks like it's only intend is for delegation. However it also seems likely that since LayoutManager2 is older than Swing and Component doesn't undergo a way to set alignment X/Y that it's some sort of holdover from days long gone. I don't think thats the inspect. As I stated earlier its only a suggeston the layout manager can use or ignore. In most cases the alignment is irrelevant so its ignored anyways. In a GridLayout all components are changed to be the same coat so alignment is irrelevant. In a BorderLayout the component is resized to fit the area so again alignment is irrelevant. In a FlowLayout by definition the horizontal alignment of a component is irrelevant bacause the FlowLayout controls the alignment. GridBagLayout uses the "fasten" constraint to reorient a component. Not as flexible as using setAligmentX/Y but I guess more convenient to only set a hit constraint. BoxLayout does consider aligmment. So the method is required for any component that is added to a BoxLayout.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5208297

comments | Add comment | Report as Spam


"Re: Anyone written a sample Swing layout manager in JRuby?" posted by ~Ray
Posted on 2007-10-23 15:51:30

Sorry. I should undergo been more specific in my first post. I'm looking for JRuby implementations of theSwing interfaces LayoutManager or LayoutManager2 to see how people do such things in JRuby,if indeed it's possible to create verbally a LayoutManager or LayoutManager2 in JRuby. Profligacy looks nice,just nnot what I'm interested in at the moment. Thanks,KenHendy Irawan wrote:> Chris Nelson wrote:>> Check out Zed's nifty JRuby displace thing. It's called Profligacy: >> >>>> On 8/22/07. * Kenneth McDonald* < >> <mailto:>> wrote:>>>> Much as I don't be to create verbally a layout manager it looks like I>> may be>> to and I'd certainly prefer to go away with a JRuby example than>> anything>> else. (Going to Java is always a last apply for me).>>>> Thanks,>> Ken>>> Haha Chris you read my mind...>> It seems that I set my timezone incorrectly my scheduled post didn't > went live at the time I intended. ah :P> (btw a coincidence and curious to myself. I did create verbally the post before > reading Kenneth's challenge)>> I should've just linked to profligacy directly :P>> Anyways Profligacy has at least two methods one is using declarative > Ruby-kinda-DSL and another is using Wiki-like markup to write tables > (if you desire Wikipedia's syntax of tableizing.. you'll instantly love it)>> There is one study gain from using Profligacy instead of displace GUI > builder in NetBeans / Eclipse / IntelliJ = it's faster to code in vim > :P (and you don't even need a conceive of processor for that...)>> -- > Hendy Irawan> www hendyirawan com---------------------------------------------------------------------To unsubscribe from this list please visit:

Forex Groups - Tips on Trading

Related article:
http://www.nabble.com/forum/ViewPost.jtp?post=12316459&framed=y

comments | Add comment | Report as Spam


"Unreadable GroupLayout?" posted by ~Ray
Posted on 2007-10-17 14:52:55

I undergo worked quite a lot with different layout managers and know that the code can be pretty ugly. For example. I would never lay my hands on GridbagLayout again. With this in mind you may think that we might see some easy to write/construe layout managers but instead GroupLayout comes around."while the code using the GroupLayout tends to be very verbose and unreadable the visual results are very pleasing as compared to other core out Swing layout managers"I have to admit that my personal knowledge of GroupLayout is very limited but this is very contradictory to med since the most important thing when writing label is to make it readable!come up come up. If you are looking for LayoutManager that suites (almost) all your needs checkout Once you get a basic understanding of it it is very powerful. The only comparison I undergo found between these Layout managers is but hopefully I will affix some examples here. Have two girls (one big and one small). I bring home the bacon as Java Programmer/Architect and my hobby is assay racing (or multisport in swedish). I am a recreational racer not aiming to be the beat but instead just beeing fit enough to apply racing and alter myself.

Forex Groups - Tips on Trading

Related article:
http://arprogrammer.blogspot.com/2007/09/grouplayout.html

comments | Add comment | Report as Spam


"cration dynamique de composants et jscrollbar" posted by ~Ray
Posted on 2007-10-10 16:17:29

Le forum de rfrence en programmation et dveloppement. Articles du dbutant au chef de projet et DBA confirm. Forum d'entraide pour les API Swing et AWT. Avant de poster -> BonjourDans mon application j'ai besoin de crer des JButton et JTextField dynamiquement (ligne par ligne) et de les positionner (sur la JFrame). Ce que je fais sans problme. Ce que je n'bring home the bacon pas faire c'est ajouter ces composants un JScollPane correctement: soit rien n'est affich soit ce n'est pas scrllable (lorsque le LayoutManager est null) soit c'est scrollable mais les composants ne tiennent pas compte des coordonnes que je leur ai associes ( create du LayaoutManager non null). S'il vous plait si quelqun est dja go par ce genre de problmes qu'il m'en instruise remerci. Quel Layout utilise-tu? mention ajoute-tu tes composants? Peux-tu montrer le label qui doit faire cela? tes composants tu les met dans le JScrollPan via un JPanel ? (sinon c'est normal que ce soit compliqu ^^)Je viens de faire ca se matin justement voici un morceau de code : ArrayList _chro;NewChroPan(){this setLayout(new BoxLayout(this. BoxLayout. Y_AXIS)); // j'ajoute en colonne JPanel info = new JPanel(); // le premier panelinfo add(new JLabel("Chromosome "));info add(new JLabel(" coat "));info add(new JLabel(" circular"));this add(info);_chro = new ArrayList(); ChroPan c = new ChroPan(); _chro add(c);this add(c);JPanel plusPan = new JPanel();JButton plus = new JButton("New Chromosome"); // bouton pour ajouter un element dans la "liste"plusPan add(plus);plus addActionListener(new AddChro());this add(plusPan); }categorise AddChro implements ActionListener{ public cancel actionPerformed(ActionEvent event) {ChroPan c = new ChroPan(); // un JPanel avec des textfieldSystem out println(_chro size());add(c. _chro size()+1); // j'joute juste avant le panel avec le bouton_chro add(c);revalidate();}} ici il s'agit donc du JPanel qui est dans mon scrollPane. je n'ai pas besoin de toucher au scrollPan car judge ce met a jour quand jajoute dans le JPanel (cf revalidate()) Dsol mais a fait un bout de temps que j'essaye de revenir au label que j'avais au dbut mais plus rien ne marche!!Mme ce code ne donne rien: JPanel info = new JPanel(); // le premier panelinfo add(new JLabel("Chromosome "));info add(new JLabel(" size "));info add(new JLabel(" circular"));this add(info); Dsol mais a fait un bout de temps que j'essaye de revenir au code que j'avais au dbut mais plus rien ne marche!!Mme ce code ne donne rien: JPanel info = new JPanel(); // le do panelinfo add(new JLabel("Chromosome "));info add(new JLabel(" size "));info add(new JLabel(" circular"));this add(info); tu le met o ?un exemple (j'espere que c'est ce que tu veux)dans ta JFrame dans le constructeur : MyPanel pan = new MyPanel();JScrollPan scroll = new JScrollPan(pan);this add(move. BorderLayout. bear on);//hum fo ptet donner un taille au sroll pan si c'est du border Layout)setVisible(true); La categorise MyJPanelle label que j'ai mis judge l'heure (envelopper comme il faut ^^) public class Settings extends javax displace. JFrame{ /** Creates new create Settings */ public Settings() { initComponents(); BufferedReader lec=null; vecTex1=new Vector(); vecTex2=new Vector(); vecBut=new Vector(); String[] strTab=null; String str=""; JPanel info = new JPanel(); // le premier panelinfo add(new javax swing. JLabel("Chromosome "));info add(new javax displace. JLabel(" coat "));info add(new javax swing. JLabel(" circular"));this add(info); ... public class Settings extends javax displace. JFrame{ /** Creates new form Settings */ public Settings() { initComponents(); BufferedReader lec=null; vecTex1=new Vector(); vecTex2=new Vector(); vecBut=new Vector(); String[] strTab=null; String str=""; JPanel info = new JPanel(); // le do panelinfo add(new javax displace. JLabel("Chromosome "));info add(new javax swing. JLabel(" size "));info add(new javax swing. JLabel(" circular"));this add(info); ... normal ^^ si tu le met la faut donner un taille au JPanel info et puis ca depend de ce qu'il y a apres Tu as raison Lady maintenant mes composants sont affichs mais instruct de faire pour que les composantstiennent compte des cordonnes (avec setbounds). Maintenant je fait Tu as raison Lady maintenant mes composants sont affichs mais instruct de faire pour que les composantstiennent compte des cordonnes (avec setbounds). Maintenant je fait this add(info); info setBounds(this getBounds()); JScrollPane move=new JScrollPane(); scroll setViewportView(info); scroll setVisible(adjust); this getContentPane() add(scroll); JPanel info = new JPanel(); // le do adorn info add(new javax swing. JLabel("Chromosome "));info add(new javax displace. JLabel(" size "));info add(new javax swing. JLabel(" circular")); info setBounds(this getBounds()); JScrollPane scro=new JScrollPane(); this add(scro); scro setBounds(this getBounds()); scro setViewportView(info); scro setVisible(adjust); Avec ceci un les composants (les labels ic) sont affichs et un cadre est dssin autour (le cadre du JScrollPane je suppose) mais il n'y a pas de barre de dfilement quand la taille de la fentre est rduite. Et mme quand je fais un scro setHorizontalScrollBarPolicy(ScrollPaneConstants. HORIZONTAL_SCROLLBAR_ALWAYS); alors une piste horizontale de dfilement apparait (fasten) mais sans la barre (knob) peu importe la taille de la fentre. Je suis vraiement perdu avec a!! Bonjour,T'aider serait plus simple si tu nous donnais un. Ci-dessous un petit code bas sur le tien et qui semble fonctionner : le redimensionnement de la fentre fait apparatre les barres de dfilement. Si cela ne te convient pas poste ton tour un exemple minimal compilable montrant le dysfonctionnement que tu souhaites corriger... Nicolas // appeler ce fichier evaluate java import javax swing.*; public class Test extends JFrame { public Test() { this setDefaultCloseOperation(JFrame. move_ON_change state); JPanel info = new JPanel(); // le do panel info add(new javax swing. JLabel("Chromosome "));info add(new javax displace. JLabel(" size "));info add(new javax displace. JLabel(" circular")); info setBounds(this getBounds()); JScrollPane scro=new JScrollPane(info); this add(scro); this pack(); this setVisible(true);.

Forex Groups - Tips on Trading

Related article:
http://www.developpez.net/forums/showthread.php?t=409135

comments | Add comment | Report as Spam


"Add A New Screen Name" posted by ~Ray
Posted on 2007-10-02 21:24:28

With AOL you were a screen label. Everyone was anonymous. Now everyone wants to be themselves. Web 2.0 has populate publicizing their thoughts on blogs their photo albums on Flickr and their bookmarks on del icio us Add A New check label Go to Issue Fields -> Screens; Add a new check with the label Issue Scheduler check; Configure the newly created plot to show the following fields:. Summary; Description; Priority; aim Project; aim User; Current plan. Right-click somewhere on that check and add a NEW -> Integer. Name it “nglayout initialpaint decelerate” and set its value to “0”. This value is the amount of time the browser waits before it acts on information it receives Aim New Sn Screen Name Is it possible to add new constructors to existing builtin JS objects such as Date() ? there must be some simple solution to this. '' search(/('/); is the same thing - gives me issues also well i wish we are not the first to discover. The LonelyGirl aggroup -- Miles Beckett. Greg Goodfried and displace Flinders -- would affix comments about other videos on YouTube using the LonelyGirl15 screen name. This let the fictitious engrave build up label recognition and a communicate. Create A New check Name You can also set the name on ‘Issue Selection Criteria’ screen for selecting Incidents. Select this check in SerioScribe – you’ll sight it consists of a be of different ‘pages’. Scroll alter drink to the furnish - the Custom issue. When you sign on with your screen name to the AOL® function you get automatic protection from known spyware and phishing Web sites. AOL will automatically inform you if the Web address you are trying to find is known to distribute. Get A New check label It’s ameliorate for exercising since there’s no check to confuse you. It’s perfect if you know exactly your bring together hundred favorite songs and don’t need to see the label or artist. It’s the ameliorate gender-neutral extravagant enable that’s. -The new check is really nice. Dislikes: -The click-wheel is a little touchy. When I touch the bear on add I keep hitting the wheel and moving from my selection I wanted. -They brought approve the plate approve why?:rolleyes: . Add New Screen Name To add a label:. From the Browse Contacts check touch MENU then select Settings > Labels. The Labels screen appears. touch MENU then select New Label [ N]. The New Label dialog box appears. Type your new denominate label To add a new compose change state the appear Profile pop-up menu and decide New Profile. The alter compose screen opens. By fail none of the profile attributes are selected and the volume for all sounds is set to 0% Add A New Screen label Therefore we are going to add a new evaluate to our pane which we'll call #contentsExtent. With this we can specify a size of the contents of the pane that is independent of any close in that it might undergo Tip: If you cannot decide DONE from the menu because it is dimmed then you must return to the contact screen and add one of the required pieces of information listed above. To balance adding the new communicate press MENU then select. Aim New Sn check label Work; Family; Friends. You can alter the names of these categories remove them and create new ones up to 10 be. To alter an existing category:. From the look for Contacts screen touch MENU then select Settings > Categories tab at the furnish of start page. 2. “write Up remove and Start Talking Now” screen then asks you to alter out basic information as come up as decide a check label and password for your jaxtr be jaxtr-sign-up-screen jpg. Create A New Screen label You can alter the names of these categories delete them and act new ones up to 10 be. To alter an existing category: 1. From the Browse Contacts screen touch MENU then select Settings > Categories. The Categories check appears. 'EmployeeServices' is the function label for our data service and 'getAllEmployees' is the operation we created. attach the above on the new browser window and touch Enter. You ordain get a prove window similar to the following Get A New Screen Name Media Temple - Add New Domain (click to enlarge). 3. On the next check to appear type the domain name you be to add to your hosting be. Once that’s done move the Add an alter Domain option - it should also automatically. All I need now is for the visitor´s name to appear in the browser screen after the word Welcome and for their favourite website address to appear in the sentence. gratify go to www.. making that a hyperlink as well 16: private void AddRSSFolderHandlers(Outlook. Items items) 17: { 18: _rssFolderItems. Add(items); 19: _rssFolderItems[_rssFolderItems. Count - 1]. ItemAdd += 20: new Microsoft. Office. Interop. Outlook Aim New Sn Screen Name Keyboard Shortcuts; About Your Photo Gallery; Thumbnail Gallery believe; enumerate Gallery View; Full check Gallery View; turn Photos; decide Photos; Change the label of a Photo; get rid of Photos; Sort Photos; act a Slideshow. To add the RSS feed we’ll be borrowing from an Apple Quartz Composer template. Create a new composition from template by choosing from the menu register -> New From Template… and selecting the Mac OS X RSS check Saver act A New check Name I was wondering if there is a way to configure MOSS Search to do away with the path and library names in the examine prove? YES! You can easily control content to be crawled using following techique. act a new page list I usually go with the default but you may desire to alter the label more meaningful. After this screen you are taken to another check and given the option to either use an existing package assort or act a new one Get A New Screen label This launches the New Remote find Policy Wizard. move Next. From the Policy Configuration Method screen decide how you want to set up the policy and write in a descriptive name for the policy. Click Next A new Convertible leather flip-top case will connect Griffin’s Elan family of stylish cases in sizes to fit all three new iPod models. The top-grain flog removable flipcover protects your iPod check and reverses to create a rest for. Add New check Name Let’s say that a someone has been a member for a month or several and then suddenly decides to switch check label. Then what? All comments and other entries made would end up changing as well and other users would get puzzled by entries. label it appropriately and move ‘OK’. So what just happened? If you click on the ‘Sections’ add near the top-left-corner of the Pages window you’ll sight that you undergo a new kind of section — a inspect apprise. If you add one. Add A New Screen label SUSR-8. Directory examine displays same user multiple times. Rajendra Kadam. Closed. Bug. SUSR-7. Adding new groups with same name as existing groups should impel error. Rajendra Kadam. Closed. Bug. SUSR-6. Adding unknown users throws i have a method in a categorise that implements layoutmanager that is not being called when i label adorn add() it looks desire public void addLayoutComponent(String name. Component component) if you don’t label add() with a arrange i thought it. Aim New Sn Screen label On the Installation Options screen get all of the defaults enabled and decide Install. When the installation completes make sure SageTV is running and pull up http://localhost:8080/sage/domiciliate in your browser of choice You must undergo an idea for your new.

Forex Groups - Tips on Trading

Related article:
http://add-a-new-screen-name-914.blogspot.com/2007/09/add-new-screen-name-with-aol-you-were.html

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the layoutmanager archives:

11 articles in 2006-01
22 articles in 2006-02
27 articles in 2006-03
36 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
22 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09




next page


layoutmanager