SlideShare a Scribd company logo
1 of 9
DECORATOR
НАЗНАЧЕНИЕ 
Динамически порождает объекты
СТРУКТУРА
РЕАЛИЗАЦИЯ 
ABSTRACT CLASS COMPONENT 
{ 
PUBLIC ABSTRACT VOID DRAW(); 
}
РЕАЛИЗАЦИЯ 
CLASS CONCRETECOMPONENT : COMPONENT 
{ 
PUBLIC OVERRIDE VOID DRAW() 
{ 
} 
}
РЕАЛИЗАЦИЯ 
ABSTRACT CLASS DECORATOR : COMPONENT 
{ 
PROTECTED COMPONENT COMPONENT; 
PUBLIC VOID SETCOMPONENT(COMPONENT COMPONENT) 
{ 
THIS.COMPONENT = COMPONENT; 
} 
PUBLIC OVERRIDE VOID DRAW() 
{ 
IF (COMPONENT != NULL) 
{ 
COMPONENT.DRAW(); 
} 
} 
}
РЕАЛИЗАЦИЯ 
CLASS SCROLLDECORATOR : DECORATOR 
{ 
PUBLIC OVERRIDE VOID DRAW() 
{ 
BASE.DRAW(); 
SCROLLTO(); 
} 
PRIVATE VOID SCROLLTO() 
{ 
} 
}
РЕАЛИЗАЦИЯ 
CLASS BORDERDECORATOR : DECORATOR 
{ 
PUBLIC OVERRIDE VOID DRAW() 
{ 
BASE.DRAW(); 
DRAWBORDER(); 
} 
PRIVATE VOID DRAWBORDER() 
{ 
} 
}
РЕАЛИЗАЦИЯ 
// CREATE CONCRETECOMPONENT AND TWO DECORATORS 
CONCRETECOMPONENT TEXTVIEW = NEW CONCRETECOMPONENT(); 
SCROLLDECORATOR SCROLLDECORATOR = NEW SCROLLDECORATOR(); 
BORDERDECORATOR BORDERDECORATOR = NEW BORDERDECORATOR(); 
// LINK DECORATORS 
SCROLLDECORATOR.SETCOMPONENT(TEXTVIEW); 
BORDERDECORATOR.SETCOMPONENT(SCROLLDECORATOR); 
SCROLLDECORATOR.DRAW(); 
BORDERDECORATOR.DRAW();

More Related Content

Viewers also liked

Présentation diagnostic numérique de territoire et programme d'actions
Présentation diagnostic numérique de territoire et programme d'actionsPrésentation diagnostic numérique de territoire et programme d'actions
Présentation diagnostic numérique de territoire et programme d'actionsPays touristique de Vannes Lanvaux
 
Economics Presentation
Economics Presentation Economics Presentation
Economics Presentation Fawad Dawezai
 
Atelier numérique facebook_010316
Atelier numérique facebook_010316Atelier numérique facebook_010316
Atelier numérique facebook_010316OT Pays Tarusate
 
Rendez-vous du numérique : comment séduire mon touriste connecté ?
Rendez-vous du numérique : comment séduire mon touriste connecté ?Rendez-vous du numérique : comment séduire mon touriste connecté ?
Rendez-vous du numérique : comment séduire mon touriste connecté ?Sud Vendée Tourisme
 
Building Consensus: Best Practices For Collaboration Between Parents & Child ...
Building Consensus: Best Practices For Collaboration Between Parents & Child ...Building Consensus: Best Practices For Collaboration Between Parents & Child ...
Building Consensus: Best Practices For Collaboration Between Parents & Child ...sagedayschool
 
Research Study on Adaptation and Needs of Women IDP's
Research Study on Adaptation and Needs of Women IDP'sResearch Study on Adaptation and Needs of Women IDP's
Research Study on Adaptation and Needs of Women IDP'sukrwomenfund
 
Scaling Student-Centered Instruction: The power of blended learning
Scaling Student-Centered Instruction: The power of blended learningScaling Student-Centered Instruction: The power of blended learning
Scaling Student-Centered Instruction: The power of blended learningRaise Your Hand Texas
 
Atelier numérique Créer sa stratégie Facebook
Atelier numérique Créer sa stratégie Facebook Atelier numérique Créer sa stratégie Facebook
Atelier numérique Créer sa stratégie Facebook Sud Vendée Tourisme
 
Darāmo lietu saraksts planētai
Darāmo lietu saraksts planētaiDarāmo lietu saraksts planētai
Darāmo lietu saraksts planētailiela_stunda
 
Aula lesoes vasculares hepáticas 2016_pdf- LILIANA MENDES
Aula lesoes vasculares hepáticas 2016_pdf- LILIANA MENDESAula lesoes vasculares hepáticas 2016_pdf- LILIANA MENDES
Aula lesoes vasculares hepáticas 2016_pdf- LILIANA MENDESLiliana Mendes
 
Introduction to Digital Media
Introduction to Digital MediaIntroduction to Digital Media
Introduction to Digital MediaLifelong Learning
 

Viewers also liked (13)

Thai music12
Thai music12Thai music12
Thai music12
 
Présentation diagnostic numérique de territoire et programme d'actions
Présentation diagnostic numérique de territoire et programme d'actionsPrésentation diagnostic numérique de territoire et programme d'actions
Présentation diagnostic numérique de territoire et programme d'actions
 
Economics Presentation
Economics Presentation Economics Presentation
Economics Presentation
 
Atelier numérique facebook_010316
Atelier numérique facebook_010316Atelier numérique facebook_010316
Atelier numérique facebook_010316
 
Thai music11
Thai music11Thai music11
Thai music11
 
Rendez-vous du numérique : comment séduire mon touriste connecté ?
Rendez-vous du numérique : comment séduire mon touriste connecté ?Rendez-vous du numérique : comment séduire mon touriste connecté ?
Rendez-vous du numérique : comment séduire mon touriste connecté ?
 
Building Consensus: Best Practices For Collaboration Between Parents & Child ...
Building Consensus: Best Practices For Collaboration Between Parents & Child ...Building Consensus: Best Practices For Collaboration Between Parents & Child ...
Building Consensus: Best Practices For Collaboration Between Parents & Child ...
 
Research Study on Adaptation and Needs of Women IDP's
Research Study on Adaptation and Needs of Women IDP'sResearch Study on Adaptation and Needs of Women IDP's
Research Study on Adaptation and Needs of Women IDP's
 
Scaling Student-Centered Instruction: The power of blended learning
Scaling Student-Centered Instruction: The power of blended learningScaling Student-Centered Instruction: The power of blended learning
Scaling Student-Centered Instruction: The power of blended learning
 
Atelier numérique Créer sa stratégie Facebook
Atelier numérique Créer sa stratégie Facebook Atelier numérique Créer sa stratégie Facebook
Atelier numérique Créer sa stratégie Facebook
 
Darāmo lietu saraksts planētai
Darāmo lietu saraksts planētaiDarāmo lietu saraksts planētai
Darāmo lietu saraksts planētai
 
Aula lesoes vasculares hepáticas 2016_pdf- LILIANA MENDES
Aula lesoes vasculares hepáticas 2016_pdf- LILIANA MENDESAula lesoes vasculares hepáticas 2016_pdf- LILIANA MENDES
Aula lesoes vasculares hepáticas 2016_pdf- LILIANA MENDES
 
Introduction to Digital Media
Introduction to Digital MediaIntroduction to Digital Media
Introduction to Digital Media
 

More from ukst

ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708ukst
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708ukst
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708ukst
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708ukst
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708ukst
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708ukst
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708ukst
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708ukst
 
Шнайдер
ШнайдерШнайдер
Шнайдерukst
 
Шнайдер
ШнайдерШнайдер
Шнайдерukst
 
SCM video v2 no comm
SCM video v2 no commSCM video v2 no comm
SCM video v2 no commukst
 
SCM video v2 no comm
SCM video v2 no commSCM video v2 no comm
SCM video v2 no commukst
 
SCM video v2 no comm
SCM video v2 no commSCM video v2 no comm
SCM video v2 no commukst
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708ukst
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708ukst
 
step2businessmodel27052015460-150527152307-lva1-app6892
step2businessmodel27052015460-150527152307-lva1-app6892step2businessmodel27052015460-150527152307-lva1-app6892
step2businessmodel27052015460-150527152307-lva1-app6892ukst
 
step2businessmodel27052015460-150527152307-lva1-app6892
step2businessmodel27052015460-150527152307-lva1-app6892step2businessmodel27052015460-150527152307-lva1-app6892
step2businessmodel27052015460-150527152307-lva1-app6892ukst
 
step2businessmodel27052015460-150527152307-lva1-app6892
step2businessmodel27052015460-150527152307-lva1-app6892step2businessmodel27052015460-150527152307-lva1-app6892
step2businessmodel27052015460-150527152307-lva1-app6892ukst
 
Decorator
DecoratorDecorator
Decoratorukst
 
Decorator
DecoratorDecorator
Decoratorukst
 

More from ukst (20)

ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708
 
Шнайдер
ШнайдерШнайдер
Шнайдер
 
Шнайдер
ШнайдерШнайдер
Шнайдер
 
SCM video v2 no comm
SCM video v2 no commSCM video v2 no comm
SCM video v2 no comm
 
SCM video v2 no comm
SCM video v2 no commSCM video v2 no comm
SCM video v2 no comm
 
SCM video v2 no comm
SCM video v2 no commSCM video v2 no comm
SCM video v2 no comm
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708
 
ORACLE HCM_2708
ORACLE HCM_2708ORACLE HCM_2708
ORACLE HCM_2708
 
step2businessmodel27052015460-150527152307-lva1-app6892
step2businessmodel27052015460-150527152307-lva1-app6892step2businessmodel27052015460-150527152307-lva1-app6892
step2businessmodel27052015460-150527152307-lva1-app6892
 
step2businessmodel27052015460-150527152307-lva1-app6892
step2businessmodel27052015460-150527152307-lva1-app6892step2businessmodel27052015460-150527152307-lva1-app6892
step2businessmodel27052015460-150527152307-lva1-app6892
 
step2businessmodel27052015460-150527152307-lva1-app6892
step2businessmodel27052015460-150527152307-lva1-app6892step2businessmodel27052015460-150527152307-lva1-app6892
step2businessmodel27052015460-150527152307-lva1-app6892
 
Decorator
DecoratorDecorator
Decorator
 
Decorator
DecoratorDecorator
Decorator
 

test title