custom-component

Flex - Custom Component - Percentage Width/Height

放肆的年华 提交于 2019-12-05 14:44:05
I am trying to create a Custom Flex Component using the Flex Component framework: http://www.adobe.com/livedocs/flex/3/html/help.html?content=ascomponents_advanced_3.html . All good components allow you to define their dimensions using percentage values using: MXML: TextInput width="100%" or Actionscript at runtime: textinp.percentWidth = 100; My question is how do you implement percentage width/height in the measure() method of your custom component? More specifically, these percentages are converted to pixels values at some stage, how is this done? The way Flex layouting works is by letting

Component communication in angular 1.5

泄露秘密 提交于 2019-12-05 10:49:12
Angular 1.5 component communication suggestions usually have output bindings to invoke methods on root controllers. Let's say I have a root component, and two child components. <root> <child-1></child-1> <child-2></child-2> </root> It'd like to react to a button click on component one by reading a value on component two and then doing something in the root. For example, child-1 is a directive which wraps a drawing library that attaches a drawing to its DOM node and has a variable to control that drawing. child-2 has a button. When it is clicked, data from the child-1 variable should be passed

Cannot find annotated custom JSF2 component in jar

拥有回忆 提交于 2019-12-05 09:12:56
We are migrating JSF1.2 to JSF2 application and I have bumped into a problem with custom components. We have a seperate jar with components, and in that jar I have this: @FacesComponent(value = "Panel2") public class Panel2 extends UIOutput { ... } In my taglib under META-INF I have this: <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd" id="mw"> <namespace>http://www.ssss.be/jsf/mw</namespace>

AS3 disable editable/selectable for textInput inside of a Datagrid

不想你离开。 提交于 2019-12-05 08:10:38
I am currently trying to disable the selectable / editable / or change the textInput to dynamic to get my desired result. I've got a custom datagrid with dropdowns and text input areas. However, if there is no data in my Model # column, I do not want to allow for any entry in the corresponding PurchasePrice cell. col1 = new DataGridColumn("Model"); col1.headerText = "Model #"; c2.consumables_dg.addColumn(col1); col1.width = 60; col1.editable = false; col1.sortable = false; col1.cellRenderer = AlternatingRowColors_editNum_PurchasePrice; col1 = new DataGridColumn("PurchasePrice"); col1

Delphi compiler warnings pointing to Delphi's own units

社会主义新天地 提交于 2019-12-05 03:31:39
In Delphi 2007, working on a project which includes a custom component, I'm getting this set of warnings as the first four in Messages when I do a full build (but not when I do a straight compile): [DCC Warning] Dialogs.pas(1426): W1002 Symbol 'TFileOpenDialog' is specific to a platform [DCC Warning] Dialogs.pas(1446): W1002 Symbol 'TFileSaveDialog' is specific to a platform [DCC Warning] ComCtrls.pas(6757): W1036 Variable 'Section' might not have been initialized [DCC Warning] ComCtrls.pas(19268): W1023 Comparing signed and unsigned types - widened both operands I generally try to eliminate

How to make subcomponent TAction-s available at design time?

吃可爱长大的小学妹 提交于 2019-12-05 02:53:06
问题 In my custom component I created some TAction-s as subcomponents. They're all published, but I could not assign them at design time since they were not available through object inspector. How do you make them "iterable" by the object inspector? I have tried to set the Owner of the actions to the Owner of the custom component (which is the hosting Form) to no success. EDIT: It looks like Embarcadero changed Delphi IDE behaviour related with this problem. If you are using Delphi versions prior

Layout not being inflated in android custom component

天大地大妈咪最大 提交于 2019-12-04 08:16:44
I'm getting a null pointer exception in my custom view (which is derived from a LinearLayout ) because it can't find its child views. Here is the code: public class MyView extends LinearLayout { public MyView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public MyView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } private TextView mText; @Override protected void onFinishInflate() { super.onFinishInflate(); mText = (TextView) findViewById(R.id.text); if (isInEditMode()) { mText.setText("Some example text."); } } } Here is the layout (

Android custom component doesn't display its children

谁说胖子不能爱 提交于 2019-12-04 06:59:17
问题 Hi guys I want to create a FieldSet component in Android. (similar to html ) so something like that. So I want my custom component to have children and to have a board. The board part is done already, but I have some issues with display the component. I'm following this answer. Here're my parts: FieldSet.java : public class FieldSet extends ViewGroup { //... 3 constructors @Override protected void onFinishInflate() int index = getChildCount(); // Collect children declared in XML. View[]

JSF custom component with @FacesComponent is not found in Spring Boot

拜拜、爱过 提交于 2019-12-03 23:37:25
I want to create a custom JSF 2.0 component but can't get it to work. My component is defined like this: @FacesComponent(value = "myCustomComponent") public class CommaSeperatedOutput extends UIComponentBase { ... } The taglib looks like this: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd" version="2.0"> <namespace>http://www.company.com/tags</namespace> <tag

Change the location of the accessory component in a filechooser

こ雲淡風輕ζ 提交于 2019-12-03 18:05:37
问题 I have a problem in changing the location of the accessory component in a filechooser. I customized a save file dialog by putting a check box in the accessory component of the file chooser. But the position of the check box is not good, it is really ugly. Can I move the accessory component to be underneath the file pane? How to do it? Or if you have other solution to do the same thing, also welcome. Thank you guys. I using following code to add the check box: JFileChooser fc = new