custom-component

OOP JavaScript - Create Custom Div Object

我们两清 提交于 2019-12-22 10:57:27
问题 I'm just starting out with OOP in JavaScript. I want to create a custom "panel." Here is what I have so far: function ShinyPanel(css, attributes) { this.container = $(document.createElement("div")).addClass("shinyPanel"); this.titleBar = $(document.createElement("div")).addClass("shinyPanelTitleBar").appendTo(this.container); this.topShine = $(document.createElement("div")).addClass("shinyPanelTopShine").appendTo(this.container); this.leftShine = $(document.createElement("div")).addClass(

Accessing attributes passed to extended PrimeFaces component

佐手、 提交于 2019-12-22 09:59:24
问题 I'm trying to create a custom component to extend PrimeFaces. I have a simple component called textInput under the test namespace that simply calls the PrimeFaces textInput component and prints out the value passed to an attribute named fieldClass and the names of any attributes passed if I pass fieldClass as a string: <test:textInput id="foo" fieldClass="field-foo" /> this is the result fieldClass = field-foo [com.sun.faces.facelets.MARK_ID, fieldClass] If I pass fieldClass as an expression

Flex - Custom Component - Percentage Width/Height

心不动则不痛 提交于 2019-12-22 08:26:13
问题 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

How to set UI for all Components of a type in java swing?

我的未来我决定 提交于 2019-12-22 05:59:22
问题 I created my own MyScrollbarUI class to have a custom scrollbar look in my application. Now I have to do scrollPane.getHorizontalScrollBar().setUI(new MyScrollbarUI()); scrollPane.getVerticalScrollBar().setUI(new MyScrollbarUI()); on any ScrollPane I use. Is it somehow possible to tell Swing that it should use MyScrollbarUI on any scrollbar. Maybe via the UIManager ? 回答1: UIManager.put("ScrollBarUI", MyScrollbarUI.class.getName()); should do the trick. You need to have a public static

AS3 disable editable/selectable for textInput inside of a Datagrid

我们两清 提交于 2019-12-22 05:26:10
问题 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 =

Adding mouseOver/mouseDown/mouseUp/etc. to custom MXML component

╄→гoц情女王★ 提交于 2019-12-21 22:03:46
问题 I'm new to Flex and am porting a pure Flash/AS3 app to Flex 4.5 I've created a custom MXML component based on BorderContainer <?xml version="1.0" encoding="utf-8"?> <s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="160" height="140" > <s:Image id="_avatar" enableLoadingState="true" x="0" y="0" width="160" height="120" /> <s:Label id="_username" x="0" y="125" fontSize="12" fontWeight="bold" /

Relative paths in custom component library

旧时模样 提交于 2019-12-20 05:42:43
问题 I have project with structure that looks like this -client ----index.html ----index.ts -core ----controls --------myControl.html --------myControl.ts ----css --------common.css myControl.html contains definition of custom component that is registered via shadow dom. in its template imports common.css that is part of "core" library: <template id="t"> <style> @import url('../css/common.css'); .... </style> .... </template> <script> (function() { var importDoc = document.currentScript

Frame inheritance and duplicate files in packages

时光毁灭记忆、已成空白 提交于 2019-12-20 03:00:10
问题 I have been developing a number of components using TFrames and ModelMaker -- I've found the combination of visual design/development + inheritance + ModelMaker to be very compelling. I then register these TFrame descendants w/a registration unit, and they become full-fledges palette-based components from there. I'm using Delphi 2007. Early in my learning about the little "snags" of this process, I found that a number of the problems I would run into with TFrame descendants streaming

What is the difference between Custom Components and Composite Components?

牧云@^-^@ 提交于 2019-12-19 10:35:10
问题 What is the difference between JSF Custom Components and Facelets Composite Components? 回答1: JSF custom components are Java classes which extend UIComponent. Facelets composite components are XHTML files which use http://java.sun.com/jsf/composite namespace. See also: When to use <ui:include>, tag files, composite components and/or custom components? 来源: https://stackoverflow.com/questions/5704620/what-is-the-difference-between-custom-components-and-composite-components

Component Initialization - Runtime vs. Designtime

时间秒杀一切 提交于 2019-12-19 07:51:34
问题 I have a series of visual compound components that I'm building, which use similar / common "connect" methods, which fire up there internal tables, etc. I am automating some of the connection stuff to connect automatically at runtime. How do I tell, at the component level, if the current state is runtime or designtime? 回答1: I think you want to check if the csDesigning flag is present in the component's ComponentState property: if csDesigning in ComponentState then // designtime else // not