Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
1ea9a40f
Commit
1ea9a40f
authored
10 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
update fromString for new onelab protocol
parent
b31367a1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/mobile/Android/src/org/geuz/onelab/Parameter.java
+4
-5
4 additions, 5 deletions
contrib/mobile/Android/src/org/geuz/onelab/Parameter.java
with
4 additions
and
5 deletions
contrib/mobile/Android/src/org/geuz/onelab/Parameter.java
+
4
−
5
View file @
1ea9a40f
...
@@ -30,7 +30,7 @@ public class Parameter {
...
@@ -30,7 +30,7 @@ public class Parameter {
_readOnly
=
readOnly
;
_readOnly
=
readOnly
;
_changed
=
false
;
_changed
=
false
;
}
}
protected
void
update
(){
protected
void
update
(){
if
(
_label
!=
null
&&
!
_label
.
equals
(
""
))
if
(
_label
!=
null
&&
!
_label
.
equals
(
""
))
_title
.
setText
(
_label
);
_title
.
setText
(
_label
);
...
@@ -38,7 +38,7 @@ public class Parameter {
...
@@ -38,7 +38,7 @@ public class Parameter {
_title
.
setText
(
getShortName
());
_title
.
setText
(
getShortName
());
if
(
isReadOnly
())
_title
.
setAlpha
(
0.423f
);
if
(
isReadOnly
())
_title
.
setAlpha
(
0.423f
);
}
}
public
void
setName
(
String
name
)
{
_name
=
name
;
this
.
update
();}
public
void
setName
(
String
name
)
{
_name
=
name
;
this
.
update
();}
public
void
setReadOnly
(
boolean
readOnly
)
{
_readOnly
=
readOnly
;
this
.
update
();}
public
void
setReadOnly
(
boolean
readOnly
)
{
_readOnly
=
readOnly
;
this
.
update
();}
public
void
setLabel
(
String
label
)
{
public
void
setLabel
(
String
label
)
{
...
@@ -65,19 +65,18 @@ public class Parameter {
...
@@ -65,19 +65,18 @@ public class Parameter {
setLabel
(
infos
[
pos
++]);
// label
setLabel
(
infos
[
pos
++]);
// label
pos
++;
// help
pos
++;
// help
pos
++;
// never change
pos
++;
// never change
pos
++;
// changed
if
(
Integer
.
parseInt
(
infos
[
pos
++])
!=
1
)
return
-
1
;
// visible
if
(
Integer
.
parseInt
(
infos
[
pos
++])
!=
1
)
return
-
1
;
// visible
this
.
setReadOnly
((
infos
[
pos
++].
equals
(
"1"
)));
// read only
this
.
setReadOnly
((
infos
[
pos
++].
equals
(
"1"
)));
// read only
int
nAttributes
=
Integer
.
parseInt
(
infos
[
pos
++]);
// number of attributes
int
nAttributes
=
Integer
.
parseInt
(
infos
[
pos
++]);
// number of attributes
pos
+=(
nAttributes
*
2
);
// key+value
pos
+=(
nAttributes
*
2
);
// key+value
int
nClients
=
Integer
.
parseInt
(
infos
[
pos
++]);
// number of client
int
nClients
=
Integer
.
parseInt
(
infos
[
pos
++]);
// number of client
pos
+=
nClients
;
// client
s
pos
+=
(
nClients
*
2
)
;
// client
+changed
this
.
update
();
this
.
update
();
return
pos
;
return
pos
;
}
}
public
boolean
changed
()
{
if
(
_changed
){
_changed
=
false
;
return
true
;}
return
_changed
;}
public
boolean
changed
()
{
if
(
_changed
){
_changed
=
false
;
return
true
;}
return
_changed
;}
public
String
getType
(){
return
"Parameter"
;}
public
String
getType
(){
return
"Parameter"
;}
public
LinearLayout
getView
()
{
public
LinearLayout
getView
()
{
LinearLayout
paramLayout
=
new
LinearLayout
(
_context
);
LinearLayout
paramLayout
=
new
LinearLayout
(
_context
);
paramLayout
.
setOrientation
(
LinearLayout
.
VERTICAL
);
paramLayout
.
setOrientation
(
LinearLayout
.
VERTICAL
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment