Questions tagged [composite]

The Composite pattern is a design pattern that allows a group of objects to be treated in the same way as a single instance of an object. It is one of the Gang of Four's structural design patterns.

Overview

The Composite pattern is a design pattern that allows a group of objects to be treated in the same way as a single instance of an object.

It is one of the Gang of Four's structural , first published in Gamma et al.'s book "Design Patterns: Elements of Reusable Object-Oriented Software".

The Composite pattern may sometimes coincide with the use of composite data types and composite variables.

See also

979 questions
0
votes
1 answer

mysql composite if column from composite values?

I need to add an extra column to my query results, The column needs to be called percent, If col1 == 0 then percent should contain NIS else percent should contain ceil(col2 / col1 * 100) So I believe the following should work: IF(col1 = 0, 'NIS',…
Hailwood
  • 89,623
  • 107
  • 270
  • 423
0
votes
1 answer

jsf composite inner tag

i'm trying to write a jsf composite tag which has a lot of options and inner options. something like a dataTable. assume you want to implement a dataTable with out it's inner tags like column it would be full of options and maybe impossible to use.…
hasan
  • 966
  • 2
  • 13
  • 40
0
votes
1 answer

JSF composite attribute for defining a value

Simple question I hope..I have my java class where a value is set to 3: private static final Integer MAX_LANGUAGES = 3; Could you give me an example how to make a composite attribute that will specify the maximum number of languages a user can…
Marko Ćilimković
  • 734
  • 1
  • 8
  • 22
0
votes
1 answer

Does Prism/Unity have a "service preloader"?

I've got a number of modules in a Prism application which load data that takes 3-8 seconds to get from a service. I would like to be able to say in my bootstrapper something like this: PSEUDO-CODE: Customers allCustomers =…
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
0
votes
1 answer

Can i inject a region into a module from a host using Prism?

I have a host thats loading a module containing 2 regions.Now in few scenarios which are available at the host end, i need to add a new region between the two in the module and load that module in the host. Pointers appreciated.
Nick
  • 586
  • 2
  • 7
  • 22
0
votes
0 answers

How to add a new region in between two existing regions?

I am trying to add a new region in between 2 already existing regions in a Composite UI application using Prism and C# 4.0. How do I accomplish this?
Nick
  • 586
  • 2
  • 7
  • 22
0
votes
2 answers

LinearLayout with Imageview and Listview

I'm working on an app where I want the logo left justified and then a list of categories on the right side. So what I have is the logo in an image view which is in the Linear Layout and then I add a ListView to the LinearLayout too so they can be…
Funkyguy
  • 628
  • 2
  • 10
  • 31
0
votes
0 answers

Redraw SWT dynamically object

Good evening. I created SWT application, which contains shell with two elements: ExpandBar and Button. At application start all items of ExpandBar are expanded and Button is under ExpandBar. I want to do the following: collapse all ExpandBar's items…
0
votes
3 answers

How to design a Composite object with varying logic executed between sub items

I'm designing a framework and I have composite objects that have sub objects that are executed asynchronously or synchronously. For the synchronous executing ones, there's usually a certain type of logic that has to run in the composite object after…
Tolga E
  • 12,188
  • 15
  • 49
  • 61
0
votes
5 answers

Storing Composite Product Numbers

I am designing a laboratory database. Several products, samples, etc are identified by a composite number with multiple parts which indicate different values such as: origin, date, type, id today, etc. Examples of composite numbers might include a…
Steven
  • 13,501
  • 27
  • 102
  • 146
0
votes
2 answers

What object should be responsible for viewtransitions in composite pattern?

now that you have seen my awesome uml diagram I can go on with the real stuff. Lets say a leaf in the left sidebar receives an action, this action wants to change something outside the scope who is responsible for changing the mainview? The…
skyw00lker
  • 819
  • 9
  • 20
0
votes
1 answer

What is GraphicsMagick's equivalent to ImageMagick's Blend?

I'm running this with ImageMagick and would like to speed it up slightly by switching to GraphicsMagick if possible. In this, case I'm blending 30% of image1.png and 70% of image2.png together into result.png. composite -blend 70 -geometry +0+22.86…
Khorkrak
  • 3,911
  • 2
  • 27
  • 37
0
votes
1 answer

Updatable composite component?

I have a problem with a composite component. This component uses the componentType attribute of the interface declaration to bind the component (and its attributes) to a backing bean. This works as long as the composite component attributes are not…
Ludovic Pénet
  • 1,136
  • 1
  • 16
  • 32
0
votes
2 answers

SQL Query to find record where one of the composite primary keys should be Max against other composite primary key

Following is my table: PatientID|VisitID|Date|Accident|Diagnosis|Doctor 1 | 1 | | | | 1 | 2 | | | | 1 | 3 | | | | Both PatientID and VisitID are composite…
0
votes
1 answer

Prism CRM techniques

We're planning to develop a lightweight CRM (customers, orders, resources etc) application in WPF with Prism.v4. We already built a outlookbar-like usercontrol and use the microsoft ribbons. There exist additional regions, but these are the…
csteinmueller
  • 2,427
  • 1
  • 21
  • 32