En:Meracie komponenty: Rozdiel medzi revíziami

Z Kiwiki
Skočit na navigaci Skočit na vyhledávání
(Vytvorená stránka „=Measuring Componets= {{navigacia_projekty_en|Meracie komponenty|{{PAGENAME}}}} {| class="wikitable" | '''Name''' || MeasureComponents (eu.sensys.measurelib) |- | '''...“)
 
 
(7 medziľahlých úprav od rovnakého používateľa nie je zobrazených.)
Riadok 1: Riadok 1:
 
=Measuring Componets=
 
=Measuring Componets=
  
{{navigacia_projekty_en|Meracie komponenty|{{PAGENAME}}}}  
+
{{navigacia_projekty_en|{{PAGENAME}}|Measuring Componets|En:MeasureDemo|MeasureDemo}}
  
{| class="wikitable"
+
<div class="sideBox noprint" style="width:250px;background-color:#ffbb33;padding-left:5px;border:2px solid #9933cc">
| '''Name''' || MeasureComponents (eu.sensys.measurelib)
+
[[En:Meracie_komponenty|Measuring Components]]
 +
----
 +
[[Meracie_komponenty:DirectionArrow|DirectionArrow]]
 +
 
 +
[[Meracie_komponenty:Keypad|Keypad]]
 +
 
 +
[[Meracie_komponenty:Meter|Meter]]
 +
 
 +
[[Meracie_komponenty:Pointer|Pointer]]
 +
 
 +
[[Meracie_komponenty:Progress|Progress]]
 +
 
 +
[[Meracie_komponenty:SevenSegment|SevenSegment]]
 +
 
 +
[[Meracie_komponenty:Slider|Slider]]
 +
 
 +
[[Meracie_komponenty:Status|Status]]
 +
 
 +
[[Meracie_komponenty:Switch|Switch]]
 +
 
 +
[[Meracie_komponenty:TermoMeter|TermoMeter]]
 +
 
 +
[[Meracie_komponenty:Text|Text]]
 +
 
 +
</div>
 +
<div itemscope itemtype="http://schema.org/SoftwareApplication">
 +
{| class="prettytable"
 +
| Name || <span itemprop="name">MeasureComponents (info.kiwiki.measurelib)</span>
 
|-
 
|-
| '''Type''' || Library
+
| Type || <span itemprop="applicationCategory">Library</span>
 
|-
 
|-
| '''Platform''' || Android
+
| Verzia || <span itemprop="version">1.1</span>
 
|-
 
|-
| '''Description''' || Library with graphical componnets for using in industrial applications.aplikácie
+
| Platform || <span itemprop="operatingSystem">Android</span>
 
|-
 
|-
| '''Download''' || still preparing...
+
| Description || <span itemprop="description">Library with graphical componnets for using in industrial applications.</span>
 +
|-
 +
| Download || [http://www.kiwiki.info/files/android/measlib.jar measlib.jar]
 +
|-
 +
| Author || <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Juraj Ďuďák</span> ([[Redaktor:Juraj]])</span>
 
|}
 
|}
 +
</div>
  
 
__NOTOC__
 
__NOTOC__
Riadok 29: Riadok 61:
 
* '''Switch''' - similar to Switch in Android
 
* '''Switch''' - similar to Switch in Android
 
* '''TermoMeter''' - Suitable for temperature visualization.  
 
* '''TermoMeter''' - Suitable for temperature visualization.  
 +
* '''Text''' - simple display value as a text with possibility of value change by KeypadWidget.
 +
 +
[[Súbor:measurelib_ico.png|link=En:MeasureDemo]] For demostration of components from ''info.kiwiki.measurelib'' library, the demo apllication is prepared. Detailed description, screenshots and video is on [[En:MeasureDemo|measureDemo]] page.
 +
  
[[Súbor:measurelib_ico.png|link=measureDemo]] For demostration of components from ''eu.sensys.measurelib'' library, the demo apllication is prepared. Detailed description, screenshots and video is on [[En:measureDemo|measureDemo]] page.
+
'''Gallery'''
 +
<gallery>
 +
Súbor:Meter1.png|Meter|link=Meracie komponenty:Meter
 +
Súbor:Pointer6.png|Pointer|link=Meracie komponenty:Pointer
 +
Súbor:Seven1.png|SevenSegment|link=Meracie komponenty:SevenSegment
 +
Súbor:Switch1.png|Switch|link=Meracie komponenty:Switch
 +
Súbor:Termometer3.png|TermoMeter|link=Meracie komponenty:TermoMeter
 +
Súbor:Status6.png|Status|link=Meracie komponenty:Status
 +
Súbor:Direction3.png|DirectionArrow|link=Meracie komponenty:DirectionArrow
 +
Súbor:Measuring components text1.png|Text|link=Meracie komponenty:Text
 +
</gallery>
  
==Download==
 
will be soon...
 
  
 
==Detailed description of library==
 
==Detailed description of library==
[[Súbor:MeasureComponets class.png|náhľad|Class diagram pre knižnicu MeasureComponents]]
+
[[Súbor:MeasureComponets class.png|náhľad|Class diagram for MeasureComponents library]]
  
 
'''Platform'''
 
'''Platform'''
Riadok 44: Riadok 88:
  
 
'''Common properties of all components'''
 
'''Common properties of all components'''
 +
Each component contains a title, additional text and graphical representation of itself. Each component graphically illustrates a numerical value, which is limited to the lower (minimum) and upper (maximum) limit. The value of this scale is divided these parts: a negative value, the normal value, warning value and critical value. All graphic components can change color performance prepared in 4 themes: android style, dark style, pastel style and green-yellow style.
  
Každý komponent obsahuje nadpis, doplňujúci text a samotné grafické znázornenie. Každý komponent graficky znázorňuje určitú číselnú hodnotu, ktorá je obmedzené spodnou (minimum) a hornou (maximum) hranicou. V tejto škále je hodnota rozdelené na časti: záporná hodnota, normálna hodnota, upozornenie a kritická hodnota. Všetkým grafickým komponentom možno meniť farebné podanie v 4 pripravených témach: štýl android, tmavý štýl, pastelový štýl a zeleno-žltý štýl.
+
===Class BaseComponent ===
 
 
===Trieda MeraciKomponent===
 
  
[[Súbor:Meraci_komponent_class.png|náhľad|Trieda MeraciKomponent]]
+
[[Súbor:Meraci_komponent_class.png|náhľad|Class BaseComponent]]
  
====Vlastnosť: label====
+
====Property: label====
Vlastnosť label definuje názov komponentu. Zvyčajne je názov zobrazený v hornej časti komponentu. Veľkosť názvu je úmerná veľkosti komponentu.
+
The property 'label' defines the label name of the component. Usually the name shown at the top of the component. Name size is proportional to the size of the component.
  
Metódy:
+
Methods:
  
 
'''setlabel'''
 
'''setlabel'''
 +
Sets the text to be displayed as the name of the component. If the name is longer than the width of component, component name is truncated.
  
Komponentu nastaví text, ktorý bude zobrazený ako názov komponentu. Ak je názov komponentu dlhší ako rozmer komponentu, názov sa skráti.
 
 
<source lang="java">
 
<source lang="java">
 
     public void setLabel(String l)
 
     public void setLabel(String l)
 +
</source>
  
</source>
 
 
'''getLabel'''
 
'''getLabel'''
  
Vráti názov komponentu.
+
Returns the name of the component.
  
 
<source lang="java">
 
<source lang="java">
 
     public String getLabel()
 
     public String getLabel()
 
</source>
 
</source>
====Vlastnosť: label2====
 
Vlastnosť label2 definuje dodatočný text. Vhodné použitie je pre zobrazenie veličiny, ktorá sa v komponente zobrazuje. Veľkosť a umiestnenie dodatočného textuje úmerné veľkosti a formátu komponentu
 
  
Metódy:
+
====Property: label2====
 +
Label2 property defines additional text. The intended use is to display additional properties of displayed value. The size and location of an additional text related to the size and format of the component
 +
 
 +
 
 +
Methods:
  
 
'''setLabel2, getLabel2'''
 
'''setLabel2, getLabel2'''
Riadok 82: Riadok 127:
 
</source>
 
</source>
  
====Vlastnosť: value====
+
====Property: value====
Vlastnosť value reprezentuje zobrazovanú hodnotu. Hodnota sa môže pohybovať v rozmedzí od ''min'' do ''max''.
+
Property 'value' represents the displayed value. The value can range from '' min'' to'' max''.
  
Metódy:
+
 
 +
Methods:
  
 
'''setValue, getValue'''
 
'''setValue, getValue'''
Riadok 94: Riadok 140:
 
</source>
 
</source>
  
====Vlastnosti: minimum, maximum====
+
====Properties: minimum, maximum====
Tieto vlastnosti určujú rozsah zobrazovaných hodnôt.
+
These properties determine the range of ​​displayed value.
  
Metódy:
+
Methods:
  
 
'''setMin, setMax, getMin, getMax'''
 
'''setMin, setMax, getMin, getMax'''
Riadok 108: Riadok 154:
 
</source>
 
</source>
  
====Vlastnosti: warning, alert====
+
====Properties: warning, alert====
Tieto vlastnosti určujú rozsah zobrazovaných hodnôt.
+
These properties determine the range of ​​displayed values .
  
Metódy:
+
 
 +
Methods:
  
 
'''setWarning, setWarningPercent, setAlert, setAlertPercent'''
 
'''setWarning, setWarningPercent, setAlert, setAlertPercent'''
 
+
Using these methods, you can set the value of warning/alert by directly entering value x ( minimum < x < maximum)  or enter a percentage of the maximum range.
Pomocou týchto metód sa dá nastaviť hodnota warning/alert priamym zadaním hodnoty, pričom pre nastavovanú hodnotu e musí platiť minimum < e < maximum alebo zadaním percentuálnej hodnoty z maxima rozsahu.
 
  
 
<source lang="java">
 
<source lang="java">
Riadok 124: Riadok 170:
 
</source>
 
</source>
  
====Vlastnosť: colorTheme====
+
====Property: colorTheme====
Táto vlastnosť určuje farebný štýl komponentu
+
This property specifies a color style of component.
  
Metódy:
+
Methods:
  
 
'''setColorTheme'''
 
'''setColorTheme'''
  
Vlastnosť colorTheme môže nadobúdať hodnotu z množiny:
+
ColorTheme property can have a value from the set:
 
*ComponentStyle.THEME_ANDROID
 
*ComponentStyle.THEME_ANDROID
 
*ComponentStyle.THEME_DARK
 
*ComponentStyle.THEME_DARK
Riadok 141: Riadok 187:
 
</source>
 
</source>
  
====Vlastnosť: valueChanged====
+
====Property: valueChanged====
Vlastnosť valueChanged je inštanciou rozhrania ''ComponentCallback'' a je použité pre notifikaciu zmeny hodnoty komponentu. Metóda ''callback'' sa spustí, ak sa zmení hodnota komponentu.
+
ValueChanged property is an instance of the interface ''ComponentCallback'' and it is used for notification of component value change. ''Callback'' method is invoked when the component value was changed.
  
Použitie spätného volania:
+
Use of callback:
 
<source lang="java">     
 
<source lang="java">     
// komponent je instancia triedy MeraciKomponent alebo jeho potomka
+
// komponent je instancia triedy BaseComponent alebo jeho potomka
 
komponent.callback = new ComponentCallback(){
 
komponent.callback = new ComponentCallback(){
 
     public void OnValueChanged(double value) {
 
     public void OnValueChanged(double value) {

Aktuálna revízia z 10:42, 27. jún 2013

Measuring Componets

Language EN [[{{#sub:En:Meracie komponenty|3|{{#len:En:Meracie komponenty}}}}|SK]] Navigation: Projects -> Measuring Componets -> MeasureDemo
Name MeasureComponents (info.kiwiki.measurelib)
Type Library
Verzia 1.1
Platform Android
Description Library with graphical componnets for using in industrial applications.
Download measlib.jar
Author


Library content

MeasureComponents package is library of visual components for application development on Android platform. The library consist of these components:

  • DirectionArrow - for direction visualization (e.g. direction of wind,...)
  • Keypad - simple entering numerical values
  • Meter - analog meter
  • Pointer - show trend. Suiteble for derivation visualization
  • Progress - similar to Progress in Android
  • SevenSegment - 7 segment display with custom number of displayed digints.
  • Slider - similar to Slider in Adnroid
  • Status - visual state indicator
  • Switch - similar to Switch in Android
  • TermoMeter - Suitable for temperature visualization.
  • Text - simple display value as a text with possibility of value change by KeypadWidget.

Measurelib ico.png For demostration of components from info.kiwiki.measurelib library, the demo apllication is prepared. Detailed description, screenshots and video is on measureDemo page.


Gallery


Detailed description of library

Class diagram for MeasureComponents library

Platform

  • Minimal Android API version: 8 (FroYo)
  • From API 11 (Honeycomb) is change of value animated.


Common properties of all components Each component contains a title, additional text and graphical representation of itself. Each component graphically illustrates a numerical value, which is limited to the lower (minimum) and upper (maximum) limit. The value of this scale is divided these parts: a negative value, the normal value, warning value and critical value. All graphic components can change color performance prepared in 4 themes: android style, dark style, pastel style and green-yellow style.

Class BaseComponent

Class BaseComponent

Property: label

The property 'label' defines the label name of the component. Usually the name shown at the top of the component. Name size is proportional to the size of the component.

Methods:

setlabel Sets the text to be displayed as the name of the component. If the name is longer than the width of component, component name is truncated.

    public void setLabel(String l)

getLabel

Returns the name of the component.

    public String getLabel()

Property: label2

Label2 property defines additional text. The intended use is to display additional properties of displayed value. The size and location of an additional text related to the size and format of the component


Methods:

setLabel2, getLabel2

    public void setLabel2(String l)
    public String getLabel2()

Property: value

Property 'value' represents the displayed value. The value can range from min to max.


Methods:

setValue, getValue

    public void setValue(double v)
    public double getValue()

Properties: minimum, maximum

These properties determine the range of ​​displayed value.

Methods:

setMin, setMax, getMin, getMax

    public void setMin(double m)
    public void setMax(double m)
    public double getMin()
    public double getMax()

Properties: warning, alert

These properties determine the range of ​​displayed values .


Methods:

setWarning, setWarningPercent, setAlert, setAlertPercent Using these methods, you can set the value of warning/alert by directly entering value x ( minimum < x < maximum) or enter a percentage of the maximum range.

    public void setMin(double m)
    public void setMax(double m)
    public double getMin()
    public double getMax()

Property: colorTheme

This property specifies a color style of component.

Methods:

setColorTheme

ColorTheme property can have a value from the set:

  • ComponentStyle.THEME_ANDROID
  • ComponentStyle.THEME_DARK
  • ComponentStyle.THEME_PASTEL
  • ComponentStyle.THEME_CITRUS
    public void setColorTheme(int colorTheme)

Property: valueChanged

ValueChanged property is an instance of the interface ComponentCallback and it is used for notification of component value change. Callback method is invoked when the component value was changed.

Use of callback:

    
// komponent je instancia triedy BaseComponent alebo jeho potomka
komponent.callback = new ComponentCallback(){
    public void OnValueChanged(double value) {
		// nejaka akcia, napr ovladanie ineho komponentu
                }
   };