custom-component

Jprogressbar.setStringpainted(true); is painting two strings

て烟熏妆下的殇ゞ 提交于 2019-12-02 11:10:59
问题 This code is creating a problem that is when I click the button two strings are being painted one horizontal and one vertical, but need only horizontal string to be painted, so please tell what should I do??? import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JProgressBar; public class R

In VueJS is it possible to bind something with v-model that is then rebound to another child?

廉价感情. 提交于 2019-12-02 10:27:24
问题 I have an app for which I'm creating a custom component that will output a single row of a table. It contains a numeric field which is user-adjustable, and so within that custom component I'm using another custom component from the quasar framework ( q-numeric ). I'm struggling to see how I can bind a variable at the top-level through 2 components - perhaps it can't be done directly, but I was hoping to avoid lots of extra code in the middle component. So far it looks like this from the top

In VueJS is it possible to bind something with v-model that is then rebound to another child?

馋奶兔 提交于 2019-12-02 03:41:17
I have an app for which I'm creating a custom component that will output a single row of a table. It contains a numeric field which is user-adjustable, and so within that custom component I'm using another custom component from the quasar framework ( q-numeric ). I'm struggling to see how I can bind a variable at the top-level through 2 components - perhaps it can't be done directly, but I was hoping to avoid lots of extra code in the middle component. So far it looks like this from the top down: In the App.vue template, I have lines like this: <config-item v-model="numParticipants">Number of

Frame inheritance and duplicate files in packages

邮差的信 提交于 2019-12-02 02:13:23
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 incorrectly (often appearing as forms in the IDE, rather than frames) could be completely eliminated by

Vue.js custom select component with v-model

心已入冬 提交于 2019-12-02 01:52:44
问题 I want to create a custom select component in Vue.js. Since I need specific options styling, I need to create 'select' made of div's etc that looks and acts like a real html select. Currently I have something like this: Vue.component('child', { template: `<div class="component-container" @click="showOptions = !showOptions"> <div class="component__select"> <span class="component__select--name">Select Fruit</span> <span class="c-arrow-down" v-if="!showOptions"></span> <span class="c-arrow-up" v

Vue.js custom select component with v-model

≡放荡痞女 提交于 2019-12-01 20:52:36
I want to create a custom select component in Vue.js. Since I need specific options styling, I need to create 'select' made of div's etc that looks and acts like a real html select. Currently I have something like this: Vue.component('child', { template: `<div class="component-container" @click="showOptions = !showOptions"> <div class="component__select"> <span class="component__select--name">Select Fruit</span> <span class="c-arrow-down" v-if="!showOptions"></span> <span class="c-arrow-up" v-if="showOptions"></span> </div> <ul class="component__select-options" v-if="showOptions" > <li class=

JSF Best Practice: Custom Components and JavaScript

喜你入骨 提交于 2019-12-01 18:34:01
I am developing a JSF Custom Component, using the information I found on the following book Pro JSF and HTML5 by Apress . So far, I successfully developed: the java class to obtain the data to be rendered in the component the java component class the java renderer class the taglib file an example page to render the taglib Everything is working fine, the component is successfully rendered. Now I would like to add javascript events and behaviour to the rendered elements , more specifically, the purpose of my custom component is to render a menu on a web page, and I would like to ad a dropdown

Array Property, TList, TStringList, or TCollection, etc (Delphi Win32)

纵然是瞬间 提交于 2019-12-01 18:21:42
I am developing various components, and regularly run into the need to have a property that has a "one-to-many" relationship, component-to-property-member. The components are often visual components, but not always, and sometimes need to be registered with the IDE (i.e. use the Property Inspector), but not always. I find myself unsure of which route to take when setting up these properties -- using an array property, a TList, a TStringList, a TCollection, or something else altogether (perhaps a new class that inherits from one of those). What are the "best practices" / guidelines for which to

JavaFx: how to reference main Controller class instance from CustomComponentController class?

懵懂的女人 提交于 2019-12-01 12:57:54
WHAT I HAVE is a standard JavaFX application: Main.java, MainController.java & main.fxml . To add custom component, I created CustomComponentController.java and custom_component_controller.fxml . PROBLEM is that in CustomComponentController methods I need to reference other methods and standard components from MenuController . I add public static MainController mc; to MainController class body, so that it can be seen from CustomComponentController ( MainController.mc.neededMethod() ). Then I try to pass everything to it in MainController.initialize() method ( mc = this; ) - when debugging this

Swift Thread 1: Fatal error: init(coder:) has not been implemented (Calling super solution doesn't work)

╄→尐↘猪︶ㄣ 提交于 2019-12-01 12:13:57
Hey guys I have searched all around and still cannot find a solution to my problem. I have a custom class here : import UIKit /** DatasourceController is simply a UICollectionViewController that allows you to quickly create list views. In order to render our items in your list, simply provide it with a Datasource object. */ open class DatasourceController: UICollectionViewController, UICollectionViewDelegateFlowLayout { open let activityIndicatorView: UIActivityIndicatorView = { let aiv = UIActivityIndicatorView(activityIndicatorStyle: .whiteLarge) aiv.hidesWhenStopped = true aiv.color =