custom-component

Whats the difference between JSF Custom Composite Components vs Custom Classic Components

若如初见. 提交于 2019-12-03 07:54:01
问题 i want to build a custom JSF Component. Now i read some docs from oracle and saw a few code Examples. The problem is i am a bit confused: It seems there are two ways to build a custom component with JSF 2.0+. As far as i understood since JSF 2.0 i can use these Composite Components to build my own component. But do they have any disadvantages compared to the "Classical" Component ? My Component will be rather complex do i loose anything (beside downwards compability) when i use Compisite

onMeasure(): wrap_content, how do I know the size to wrap?

蹲街弑〆低调 提交于 2019-12-03 05:10:58
问题 I have made a custom View with onDraw() overridden that draws a bitmap on the canvas. When I specify that I want it wrap_content in the layout file it still fills up the entire screen. onMeasure() says this: The base class implementation of measure defaults to the background size, unless a larger size is allowed by the MeasureSpec . Subclasses should override onMeasure(int, int) to provide better measurements of their content. Ok cool so I know I need to override onMeasure() and work with

Is there a `ProgressButton`?

孤街醉人 提交于 2019-12-03 04:19:33
问题 I could like to have a button that does double duty as a progress bar. + = ........ E.g. a button that fills up with a green background as the task progresses. I know I can create my own, but if there's something ready made I'd love to use that. Does anyone know of a free or commercial component that fits the bill? I would prefer it to work in Delphi-2007, but if it's only available in XE2 that would be OK as well. Update TMS has a glassbutton that allows transparency. If you put a Shape

Custom FragmentDialog with round corners and not 100% screen width

别来无恙 提交于 2019-12-03 02:18:19
问题 I am creating a custom fragment dialog with round corners and with layout that would not fill the screen width (I would prefer if it just wrapped its content). this is my rounded_dialog.xml in drawable folder, which is called by my Custom ThemeWithCorners as a background for the dialog. I also tried to set it as background to the linear layout which creates its content but nothing works. <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <solid

“<c:if>” and “rendered” is not working at all

半城伤御伤魂 提交于 2019-12-02 21:26:34
问题 I need to read a certain attribute from the parent component... but its not working at all, I tried 2 things to define the attribute using: <ui:param> and <c:set> and to read them I tried also 2 things: <ui:fragment> and <c:if test> but no luck Here is the code: <ui:param name="panelName" value="#{component.parent.attributes.panelName}" /> <c:set var="panelName2" value="{component.parent.attributes.panelName}" scope="view" /> <c:if test="#{panelName == 'abc'}"> anything </c:if> <ui:fragment

how to make a Custom JTextComponent

若如初见. 提交于 2019-12-02 19:35:52
问题 I am trying to make a program that requires a couple of custom JTextComponents. For example I need something that acts like a small JTextArea with a different border (not a rectangular one), and some more rules about how to layout the text, characters per lines, max lines aloud, and formatting to fit into the non rectangular border. How do I properly extend JTextComponent so that people will be able to edit the text inside this the component? 来源: https://stackoverflow.com/questions/27334155

Is there a `ProgressButton`?

£可爱£侵袭症+ 提交于 2019-12-02 17:36:38
I could like to have a button that does double duty as a progress bar. + = ........ E.g. a button that fills up with a green background as the task progresses. I know I can create my own, but if there's something ready made I'd love to use that. Does anyone know of a free or commercial component that fits the bill? I would prefer it to work in Delphi-2007, but if it's only available in XE2 that would be OK as well. Update TMS has a glassbutton that allows transparency. If you put a Shape (with rounded corners) in a dark green color underneigh, it looks just like the effect that I want. Just

SSIS Custom transformation receive variable

我的未来我决定 提交于 2019-12-02 16:46:41
问题 I am creating a custom transformation in C# to be used in SSIS. I have already been able creating and adding the custom component and receive and alter data from a db source but I need more data to register in a log table. This data can only be passed with variables but I can't find a good explanation of how to add a readonlyvariable to my component. I have tried to use IDTSVariable100 and VariableDispenser but I can't make sense of how to. public override void ProvideComponentProperties() {

Custom FragmentDialog with round corners and not 100% screen width

不打扰是莪最后的温柔 提交于 2019-12-02 15:49:01
I am creating a custom fragment dialog with round corners and with layout that would not fill the screen width (I would prefer if it just wrapped its content). this is my rounded_dialog.xml in drawable folder, which is called by my Custom ThemeWithCorners as a background for the dialog. I also tried to set it as background to the linear layout which creates its content but nothing works. <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <solid android:color="@android:color/white"/> <corners android:radius="20dp" /> </shape> and this is how i call the

“<c:if>” and “rendered” is not working at all

安稳与你 提交于 2019-12-02 11:42:17
I need to read a certain attribute from the parent component... but its not working at all, I tried 2 things to define the attribute using: <ui:param> and <c:set> and to read them I tried also 2 things: <ui:fragment> and <c:if test> but no luck Here is the code: <ui:param name="panelName" value="#{component.parent.attributes.panelName}" /> <c:set var="panelName2" value="{component.parent.attributes.panelName}" scope="view" /> <c:if test="#{panelName == 'abc'}"> anything </c:if> <ui:fragment rendered="#{panelName2 == 'abc'}"> Hellooo </ui:fragment> I am using JSF 2.2 Could anyone explain why